Di chuyển một trang web dựa trên Jekyll từ GitHub Pages Migrating a Jekyll-based site from GitHub Pages ការផ្លាស់ប្តូរគេហទំព័រ Jekyll ពី GitHub 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 Jekyll-based site từ GitHub 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 a Jekyll-based site from GitHub Pages to Cloudflare Pages.
តើធ្វើដូចម្តេចដើម្បីផ្លាស់ប្តូរគេហទំព័រ Jekyll ពី GitHub Pages ទៅ Cloudflare Pages ។
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 5 years ago Official docs — last reviewed: almost 5 years ago ឯកសារផ្លូវការ — ពិនិត្យចុងក្រោយ: almost 5 years ago
Overview Overview Overview
Trong tutorial này, bạn sẽ migrate an existing GitHub Pages site using Jekyll ↗ to Cloudflare Pages. Jekyll is one of the most popular static site generators used with GitHub Pages, and migrating your GitHub Pages site to Cloudflare Pages will take a few short steps.
Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «Overview» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Thêm các phụ thuộc cần thiết được sử dụng bởi GitHub Pages vào cấu hình dự án của bạn.
- Tạo một trang web Cloudflare Pages mới, kết nối với kho lưu trữ GitHub hiện có của bạn.
- Xây dựng và triển khai trang web của bạn trên Cloudflare Pages.
- (Tùy chọn) Di chuyển miền tùy chỉnh của bạn.
- Adding the necessary dependencies used by GitHub Pages to your project configuration.
- Creating a new Cloudflare Pages site, connected to your existing GitHub repository.
- Building and deploying your site on Cloudflare Pages.
- (Optional) Migrating your custom domain.
- ការបន្ថែមគោលបំណងដែលត្រូវប្រើដោយ GitHub Pages ដើម្បីកំណត់គម្រោងរបស់អ្នក។
- ការបង្កើតគេហទំព័រថ្មី Cloudflare Pages ដែលមានការតភ្ជាប់ជាមួយ repository របស់អ្នកដែលមាន GitHub ។
- ការបង្កើតនិងដំឡើងគេហទំព័ររបស់អ្នកនៅ Cloudflare Pages ។
- (តម្រូវការ) ការផ្លាស់ប្តូរឧបករណ៍ជំនាញរបស់អ្នក។
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Trước khi bạn bắt đầu Before you begin មុនពេលដែលអ្នកចាប់ផ្តើម
Phần «Before you begin» — đọ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 "Before you begin" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «មុនពេលដែលអ្នកចាប់ផ្តើម» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Bạn có một trang web hiện có GitHub Pages sử dụng Jekyll ↗
- Bạn đã quen thuộc với các công cụ dòng lệnh của Ruby và đã cài đặt cả
gemvàbundle. - Bạn biết cách sử dụng một vài hoạt động Git cơ bản, bao gồm
add,commit,pushvàpull. - Bạn đã đọc hướng dẫn Get Started cho Cloudflare Pages.
- You have an existing GitHub Pages site using Jekyll ↗
- You have some familiarity with running Ruby's command-line tools, and have both
gemandbundleinstalled. - You know how to use a few basic Git operations, including
add,commit,push, andpull. - You have read the Get Started guide for Cloudflare Pages.
- តើអ្នកមានគេហទំព័រដែលមាន GitHub Pages ដែលប្រើ Jekyll ↗
- អ្នកមានជំនាញវិជ្ជាជីវៈក្នុងការដំណើរការឧបករណ៍ Ruby និងមាន
gemនិងbundleដែលបានដំឡើង។ - អ្នកដឹងពីរបៀបប្រើប្រតិបត្តិការ Git មួយចំនួនជាមូលដ្ឋានដូចជា
add,commit,pushនិងpull។ - You have read the Get Started guide for Cloudflare Pages ។
gem) hoặc Bundler (bundle) cài đặt trên máy của bạn, hãy tham khảo hướng dẫn cài đặt cho Rubygems ↗ và Bundler ↗.gem) or Bundler (bundle) installed on your machine, refer to the installation guides for Rubygems ↗ and Bundler ↗.gem) ឬ Bundler (bundle) ត្រូវបានដំឡើងនៅក្នុងម៉ាស៊ីនរបស់អ្នក, សូមពិនិត្យមើលឧបករណ៍ដំឡើងសម្រាប់ Rubygems ↗ និង Bundler ↗ ។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Chuẩn bị kho lưu trữ GitHub Pages Preparing your GitHub Pages repository ការរៀបចំការផ្ទុករបស់អ្នក GitHub Pages
Phần «Preparing your GitHub Pages repository» — đọ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 "Preparing your GitHub Pages repository" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការរៀបចំការផ្ទុករបស់អ្នក GitHub Pages» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
Gemfile và Gemfile.lock, bạn có thể bỏ qua bước này hoàn toàn. Môi trường GitHub Pages giả định một tập hợp các plugin Jekyll mặc định không được chỉ định rõ ràng trong một Gemfile.Gemfile and Gemfile.lock present, you can skip this step entirely. The GitHub Pages environment assumes a default set of Jekyll plugins that are not explicitly specified in a Gemfile.Gemfile និង Gemfile.lock នៅពេលនេះអ្នកអាចបាត់បន្ថយដំណោះស្រាយនេះទាំងអស់។ ប្រព័ន្ធប្រតិបត្តិការ GitHub Pages មានប្រព័ន្ធប្រតិបត្តិការ Jekyll ដែលមិនត្រូវបានបញ្ជាក់នៅក្នុង Gemfile ។Gemfile (tệp cấu hình phụ thuộc của Ruby) để cho phép Cloudflare Pages thu thập và cài đặt các phụ thuộc đó trong build step.Gemfile (Ruby's dependency configuration file) to allow Cloudflare Pages to fetch and install those dependencies during the build step.Gemfile (ឯកសារកំណត់កំណត់កំណត់កំណត់របស់ Ruby) ដើម្បីអនុញ្ញាតឱ្យ Cloudflare Pages ដើម្បីទាញយកនិងដំឡើងកំណត់កំណត់កំណត់កំណត់ដែលមាននៅពេល build step ។Gemfile và cài đặt viên ngọc github-pages, bao gồm tất cả các phụ thuộc mà môi trường GitHub Pages giả định.Gemfile and install the github-pages gem, which includes all of the dependencies that the GitHub Pages environment assumes.Gemfile និងដំឡើង github-pages អេឡិចត្រូនិដែលរួមបញ្ចូលទាំងអស់នៃការផ្លាស់ប្តូរដែលការផ្លាស់ប្តូរ GitHub Pages មាន។brew install [email protected]
export PATH="/usr/local/opt/[email protected]/bin:$PATH" cd my-github-pages-repo
bundle init Gemfile đã được tạo cho bạn, và thêm dòng sau vào dưới cùng của tệp:Gemfile that was created for you, and add the following line to the bottom of the file:Gemfile ដែលបានបង្កើតសម្រាប់អ្នកហើយបន្ថែមបន្ទាត់ខាងក្រោមទៅខាងក្រោមនៃឯកសារ:gem "github-pages", group: :jekyll_plugins Gemfile của bạn sẽ trông giống như dưới đây:Gemfile should resemble the below:Gemfile របស់អ្នកគួរតែដូចខាងក្រោម:# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
gem "github-pages", group: :jekyll_plugins bundle update, sẽ cài đặt viên ngọc github-pages cho bạn, và tạo một tệp Gemfile.lock với các phiên bản phụ thuộc được giải quyết.bundle update, which will install the github-pages gem for you, and create a Gemfile.lock file with the resolved dependency versions.bundle update ដែលនឹងដំឡើង github-pages អេឡិចត្រូនិសម្រាប់អ្នកនិងបង្កើតឯកសារ Gemfile.lock ជាមួយនឹងការដំឡើងកំណែអេឡិចត្រូនិ។bundle update
# Bundler will show a lot of output as it fetches the dependencies github-pages ở trên và không bình luận nó với dòng # hàng đầu.github-pages line above exactly, and have not commented it out with a leading #.github-pages នៅខាងលើយ៉ាងត្រឹមត្រូវហើយមិនបាននិយាយថាតើវាមានតំណាង # ។git add Gemfile Gemfile.lock
git commit -m "deps: added Gemfiles"
git push origin main Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Cấu hình dự án Pages Configuring your Pages project ការកំណត់គម្រោងរបស់អ្នក Pages
Phần «Configuring your 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 "Configuring your Pages project" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការកំណត់គម្រោងរបស់អ្នក Pages» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Trong bảng điều khiển Cloudflare, đi đến trang Workers & Pages.
- In the Cloudflare dashboard, go to the Workers & Pages page.
- ក្នុងប្រព័ន្ធប្រតិបត្តិការ Cloudflare សូមចូលទៅក្នុងទំព័រ Workers & Pages ។
- Chọn Create application &> Pages > Import an existing Git repository.
- Chọn kho GitHub mới mà bạn đã tạo và, trong phần Set up builds and deployments, cung cấp thông tin sau:
- Select Create application \> Pages \> Import an existing Git repository.
- Select the new GitHub repository that you created and, in the Set up builds and deployments section, provide the following information:
- សូមជ្រើសរើស Create application & > Pages > Import an existing Git repository ។
- ជ្រើសរើសប្រព័ន្ធផ្ទុកថ្មី GitHub ដែលអ្នកបានបង្កើតហើយក្នុងផ្នែក Set up builds and deployments សូមផ្តល់ព័ត៌មានដូចខាងក្រោម:
jekyll, phụ thuộc dự án của bạn, và xây dựng trang web của bạn, trước khi triển khai nó.jekyll, your project dependencies, and building your site, before deploying it.jekyll, ការផ្លាស់ប្តូរគម្រោងរបស់អ្នកនិងការបង្កើតគេហទំព័ររបស់អ្នកមុនពេលដំឡើងវា។*.pages.dev. Mỗi khi bạn cam kết mã mới cho trang web Jekyll của bạn, Cloudflare Pages sẽ tự động xây dựng lại dự án của bạn và triển khai nó. Bạn cũng sẽ nhận được access đến preview deployments trên yêu cầu kéo mới, vì vậy bạn có thể xem trước những thay đổi trông như thế nào cho trang web của bạn trước khi triển khai chúng vào sản xuất.*.pages.dev. Every time you commit new code to your Jekyll site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to preview deployments on new pull requests, so you can preview how changes look to your site before deploying them to production.*.pages.dev ។ នៅពេលដែលអ្នកអនុញ្ញាតកូដថ្មីទៅលើគេហទំព័រ Jekyll របស់អ្នក Cloudflare Pages នឹងរចនាឡើងដោយស្វ័យប្រវត្តិគម្រោងរបស់អ្នកហើយដំឡើងវា។ អ្នកនឹងទទួលបាន access ទៅ preview deployments នៅលើតម្រូវការបង្វិលថ្មី, ដូច្នេះអ្នកអាចមើលមុនពីរបៀបដែលការផ្លាស់ប្តូរមើលទៅលើគេហទំព័ររបស់អ្នកមុនពេលដំឡើងវាទៅផលិតកម្ម។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Di chuyển domain custom của bạn Migrating your custom domain ការផ្លាស់ប្តូរឧបករណ៍ Domain របស់អ្នក
Phần «Migrating your custom 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 "Migrating your custom domain" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «ការផ្លាស់ប្តូរឧបករណ៍ Domain របស់អ្នក» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
CNAME tại nhà cung cấp DNS cho tên miền của bạn để trỏ đến <your-pages-site>.pages.dev, thay thế <your-username>.github.io.CNAME record at the DNS provider for your domain to point to <your-pages-site>.pages.dev, replacing <your-username>.github.io.CNAME នៅលើអ្នកផ្គត់ផ្គង់ DNS សម្រាប់ទីផ្សាររបស់អ្នកដើម្បីបង្ហាញទៅ <your-pages-site>.pages.dev, ការផ្លាស់ប្តូរ <your-username>.github.io ។Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
Tiếp theo là gì? What's next? តើអ្វីជាបន្ទាប់?
Phần «What's next?» — đọ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 "What's next?" section below — open the official docs link for full screenshots and configuration tabs.
អានផ្នែក «តើអ្វីជាបន្ទាប់?» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។
- Tìm hiểu cách customize HTTP response headers cho trang web Pages của bạn bằng cách sử dụng Cloudflare Workers.
- Hiểu làm thế nào để rollback a potentially broken deployment để một phiên bản làm việc trước đó.
- Configure redirects để khách truy cập luôn được hướng tới miền tùy chỉnh 'canonical' của bạn.
- Learn how to customize HTTP response headers for your Pages site using Cloudflare Workers.
- Understand how to rollback a potentially broken deployment to a previously working version.
- Configure redirects so that visitors are always directed to your 'canonical' custom domain.
- តើធ្វើដូចម្តេចដើម្បី customize HTTP response headers សម្រាប់គេហទំព័ររបស់អ្នក Pages ដោយប្រើ Cloudflare Workers ។
- តើធ្វើដូចម្តេចដើម្បី rollback a potentially broken deployment ទៅជាកំណែដែលធ្វើការមុន។
- Configure redirects ដូច្នេះអ្នកចូលទស្សនកិច្ចនឹងត្រូវបានផ្លាស់ប្តូរនៅពេលវេលាទៅនឹងអាសយដ្ឋានផ្ទាល់ខ្លួនរបស់អ្នក 'canonical'.
{"@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-jekyll-from-github-pages/","name":"Migrating a Jekyll-based site from GitHub Pages"}}]} Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)
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 ↗ ឯកសារផ្លូវការ ↗