Di chuyển từ Netlify sang Pages Migrating from Netlify to Pages ការធ្វើដំណើរពី Netlify ទៅ Pages
Hướng dẫn chi tiết đồng bộ từ docs Cloudflare — mỗi section có backlink tới đúng vị trí trên trang gốc. Detailed guide synced from Cloudflare docs — each section links to the matching anchor on the official page. មគ្គុទ្ទេសក៍លម្អិតធ្វើសមកាលពី docs Cloudflare — ផ្នែកនីមួយៗមានតំណទៅទីតាំងត្រូវគ្នានៅទំព័រផ្លូវការ។
← Danh mục ← Catalog ← បញ្ជីGiải thích nhanh Quick context បរិបទរហ័ស
Thuộc Developer Platform — thực hành triển khai code, API và dữ liệu trên edge/serverless. Tutorial «Migrating từ Netlify to Pages» giúp bạn làm quen luồng triển khai thật — phù hợp đọc trước khi mở tài liệu gốc tiếng Anh. Đọc phần tóm tắt và lưu ý trước — sau đó mở docs gốc để copy lệnh và cấu hình chi tiết.
Learn how to migrate from Netlify to Cloudflare. This guide includes instructions for migrating redirects and headers.
តើធ្វើដូចម្តេចដើម្បីផ្លាស់ប្តូរពី Netlify ទៅ Cloudflare? វគ្គបណ្តុះបណ្តាលនេះរួមបញ្ចូលទាំងការបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តាល។
Lưu ý Note ចំណាំ
Lưu ý trước khi làm Notes before you start ចំណាំមុនពេលចាប់ផ្តើម
- Đây là bản tóm tắt trên Orange Cloud Learning Hub — không thay thế tài liệu chính thức.
- Luôn mở liên kết «Tài liệu gốc» bên dưới khi cần lệnh CLI, snippet code và ảnh minh họa đầy đủ.
- Cần tài khoản Cloudflare, Wrangler CLI và (thường) hoàn thành hướng dẫn Get started của Workers/Pages.
- Docs Cloudflare cập nhật thường xuyên — đối chiếu ngày «Rà soát lần cuối» trên trang gốc khi triển khai production.
- This is a summary on Orange Cloud Learning Hub — it does not replace the official documentation.
- Open the Official docs link below for CLI commands, code snippets, and full screenshots.
- Requires a Cloudflare account, Wrangler CLI, and (typically) completing the Workers/Pages Get started guide.
- Cloudflare docs change frequently — verify the Last reviewed date on the official page before production use.
- នេះគឺជាការបញ្ជាក់អំពី Orange Cloud Learning Hub — វាគឺជាការផ្លាស់ប្តូរនៃឯកសារផ្លូវការ។
- ចុចតំណភ្ជាប់ Docs Official នៅខាងក្រោមសម្រាប់ការបញ្ជា CLI, សៀវភៅកូដនិងរូបថតពេញលេញ។
- តម្រូវឱ្យមានគណនី Cloudflare, Wrangler CLI និង (ប្រហែលជា) ការបញ្ចប់គណនី Workers/Pages Get started ។
- Cloudflare បានផ្លាស់ប្តូរជាធម្មតានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅ។
Tài liệu gốc — rà soát lần cuối: almost 4 years ago Official docs — last reviewed: almost 4 years ago ឯកសារផ្លូវការ — ពិនិត្យចុងក្រោយ: almost 4 years ago
Overview Overview Overview
Trong tutorial này, bạn sẽ migrate your Netlify application to Cloudflare Pages.
Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Overview» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Tìm lệnh build và xây dựng thư mục Finding your build command and build directory សូមស្វែងរកគោលបំណង build និង build directory របស់អ្នក
Phần «Finding your build command và build directory» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Finding your build command and build directory" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «សូមស្វែងរកគោលបំណង build និង build directory របស់អ្នក» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
yarn build, và Publish directory là build/.yarn build, and Publish directory is build/.yarn build និង Publish directory គឺជា build/ ។Chuyển đổi redirects và headers Migrating redirects and headers ការផ្លាស់ប្តូរ redirect និង headers
Phần «Migrating redirects và headers» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Migrating redirects and headers" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការផ្លាស់ប្តូរ redirect និង headers» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
<em>redirects trong thư mục xuất bản của bạn, bạn có thể sử dụng cùng một tệp trong Cloudflare Pages và các chuyển hướng của bạn sẽ được thực hiện thành công. Nếu các chuyển hướng của bạn nằm trong tệp netlify.toml, bạn sẽ cần phải thêm chúng vào thư mục </em>redirects. Cloudflare Pages hiện đang cung cấp supports for advanced redirects giới hạn. Trong trường hợp bạn có hơn 2000 quy tắc chuyển hướng tĩnh và / hoặc 100 quy tắc chuyển hướng động, bạn nên sử dụng Bulk Redirects.<em>redirects file in your publish directory, you can use the same file in Cloudflare Pages and your redirects will execute successfully. If your redirects are in your netlify.toml file, you will need to add them to the </em>redirects folder. Cloudflare Pages currently offers limited supports for advanced redirects. In the case where you have over 2000 static and/or 100 dynamic redirects rules, it is recommended to use Bulk Redirects.<em>redirects file in your publish directory, you can use the same file in Cloudflare Pages and your redirects will execute successfully. If your redirects are in your netlify.toml file, you will need to add them to the </em>redirects folder. Cloudflare Pages currently offers limited supports for advanced redirects. In the case where you have over 2000 static and/or 100 dynamic redirects rules, it is recommended to use Bulk Redirects.<em>headers trong thư mục xuất bản của bạn. Điều quan trọng cần lưu ý là tiêu đề tùy chỉnh được xác định trong tệp </em>headers hiện không được áp dụng cho các câu trả lời từ các hàm, ngay cả khi đường dẫn hàm khớp với mẫu URL. Để tìm hiểu thêm về cách handle headers, refer to Headers.<em>headers folder in your publish directory. It is important to note that custom headers defined in the </em>headers file are not currently applied to responses from functions, even if the function route matches the URL pattern. To learn more about how to handle headers, refer to Headers.<em>headers នៅក្នុងឯកសារបោះពុម្ពរបស់អ្នក។ វាគឺជាការសំខាន់ក្នុងការយល់ដឹងថានៅពេលនេះថានៅក្នុងឯកសារ </em>headers មិនត្រូវបានប្រើសម្រាប់ការឆ្លើយតបពីតម្រូវការប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះប៉ុណ្ណោះ។ សូមអានបន្ថែមអំពីរបៀបធ្វើ handle headers, refer to Headers ។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Forms Forms Forms
Phần «Forms» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Forms" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Forms» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
data-netlify = "true" hoặc thuộc tính Netlify từ thẻ <form>. Bây giờ bạn có thể đặt logic form của mình dưới dạng hàm Pages và thu thập các mục vào cơ sở dữ liệu hoặc Airtable. Hãy tham khảo hướng dẫn handling form submissions with Pages Functions để biết thêm thông tin.data-netlify = "true" attribute or the Netlify attribute from the <form> tag. You can now put your form logic as a Pages Function and collect the entries to a database or an Airtable. Refer to the handling form submissions with Pages Functions tutorial for more information.data-netlify = "true" attribute or the Netlify attribute from the <form> tag. ឥឡូវនេះអ្នកអាចដំឡើងប្រវត្តិសាស្រ្ត form របស់អ្នកជាប្រវត្តិសាស្រ្ត Pages ហើយទាញយកឯកសារនៅក្នុងទិន្នន័យឬ Airtable ។ សូមពិនិត្យមើល handling form submissions with Pages Functions សៀវភៅសម្រាប់ព័ត៌មានបន្ថែមទៀត។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Các chức năng serverless Serverless functions សកម្មភាព Serverless
Netlify functions and Pages Functions share the same filesystem convention using a functions directory in the base of your project to handle your serverless functions. However, the syntax and how the functions are deployed differs. Pages Functions run trên Cloudflare Workers,…
Read the "Serverless functions" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «សកម្មភាព Serverless» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
functions ở cơ sở dự án của bạn để xử lý các hàm không có máy chủ của bạn. Tuy nhiên, ngữ pháp và cách các chức năng được triển khai khác nhau. Pages Các hàm chạy trên Cloudflare Workers, mặc định hoạt động trên mạng toàn cầu Cloudflare và không yêu cầu bất kỳ mã hoặc cấu hình bổ sung nào để triển khai.functions directory in the base of your project to handle your serverless functions. However, the syntax and how the functions are deployed differs. Pages Functions run on Cloudflare Workers, which by default operate on the Cloudflare global network, and do not require any additional code or configuration for deployment.functions នៅកម្រិតខាងក្រោមនៃគម្រោងរបស់អ្នកដើម្បីគ្រប់គ្រងសម្ភារៈដោយគ្មានបណ្តាញ។ ទោះជាយ៉ាងណាក៏ដោយការប្រៀបធៀបនិងរបៀបដែលគោលបំណងត្រូវបានដំឡើងគឺខុសគ្នា។ Pages ឧបករណ៍ដំណើរការនៅលើ Cloudflare Workers ដែលជាទូទៅដំណើរការនៅលើបណ្តាញពិភពលោក Cloudflare ហើយមិនត្រូវការកូដឬការកំណត់បន្ថែមណាមួយសម្រាប់ការដំឡើង។Chức năng Syntax Functions syntax សកម្មភាព Syntax
Phần «Functions syntax» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Functions syntax" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «សកម្មភាព Syntax» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
onRequest duy nhất chấp nhận đối tượng context. Đối tượng context chứa tất cả thông tin cho yêu cầu, chẳng hạn như request, env, params, và trả về một câu trả lời mới. Tìm hiểu thêm về writing your first functiononRequest function that accepts a context object. The context object contains all the information for the request such as request, env, params, and returns a new Response. Learn more about writing your first functiononRequest មួយតែមួយដែលទទួលបានសកម្មភាព context ។ សម្ភារៈ context មានទិន្នន័យទាំងអស់សម្រាប់តម្រូវការដូចជា request, env, params និងបង្ហាញការឆ្លើយតបថ្មី។ សូមអរគុណចំពោះ writing your first functionexports.handler = async function (event, context) {
return {
statusCode: 200,
body: JSON.stringify({ message: "Hello World" }),
};
}; export async function onRequestPost(request) {
return new Response(`Hello world`);
} Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Các cấu hình Netlify khác Other Netlify configurations លក្ខណៈពិសេស Netlify
Phần «Other Netlify configurations» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Other Netlify configurations" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «លក្ខណៈពិសេស Netlify» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
netlify.toml của bạn có thể có các cấu hình khác được hỗ trợ bởi Pages, chẳng hạn như triển khai xem trước, chỉ định thư mục xuất bản và plugin. Bạn có thể xóa các tập tin sau khi di chuyển cấu hình của bạn.netlify.toml file might have other configurations that are supported by Pages, such as, preview deployment, specifying publish directory, and plugins. You can delete the file after migrating your configurations.netlify.toml របស់អ្នកអាចមានកំណត់ផ្គង់ផ្សេងទៀតដែលត្រូវបានគាំទ្រដោយ Pages ដូចជាការបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តុះបណ្តាល។ អ្នកអាចដោះស្រាយឯកសារបន្ទាប់ពីការដោះស្រាយកំណត់របស់អ្នក។Access quản lý Access management Access ការគ្រប់គ្រង
Phần «Access management» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Access management" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Access ការគ្រប់គ្រង» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Tạo một dự án mới Pages Creating a new Pages project ការបង្កើតគម្រោងថ្មី Pages
Phần «Creating mới Pages dự án» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Creating a new Pages project" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការបង្កើតគម្រោងថ្មី Pages» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Làm sạch ứng dụng cũ của bạn và gán tên miền Cleaning up your old application and assigning the domain ការចែកចាយកម្មវិធីថ្មីរបស់អ្នកនិងកំណត់តំបន់បណ្ដាញ
Phần «Cleaning up your old ứng dụng và assigning domain» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Cleaning up your old application and assigning the domain" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការចែកចាយកម្មវិធីថ្មីរបស់អ្នកនិងកំណត់តំបន់បណ្ដាញ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
<SUBDOMAIN>.pages.dev của bạn.<SUBDOMAIN>.pages.dev subdomain.<SUBDOMAIN>.pages.dev របស់អ្នក។{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/pages/","name":"Pages"}},{"@type":"ListItem","position":3,"item":{"@id":"/pages/migrations/","name":"Migration guides"}},{"@type":"ListItem","position":4,"item":{"@id":"/pages/migrations/migrating-from-netlify/","name":"Migrating from Netlify to Pages"}}]} Xem bản đầy đủ trên developers.cloudflare.com (ảnh, tab cấu hình). View the full guide on developers.cloudflare.com (images, config tabs). មើលមគ្គុទ្ទេសក៍ពេញលើ developers.cloudflare.com (រូបភាព, tab កំណត់)។
Tài liệu gốc ↗ Official docs ↗ ឯកសារផ្លូវការ ↗