From dd18d9cc9ddcac01b8b99e68e455cc46816b42d0 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 18 Aug 2022 07:55:58 -0500 Subject: [PATCH 1/2] :memo: Add deployment note about Cloudflare pages Per the discussion in jpanther/congo#266. Signed-off-by: Major Hayden --- .../content/docs/hosting-deployment/index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/exampleSite/content/docs/hosting-deployment/index.md b/exampleSite/content/docs/hosting-deployment/index.md index cc38643f..4d860845 100644 --- a/exampleSite/content/docs/hosting-deployment/index.md +++ b/exampleSite/content/docs/hosting-deployment/index.md @@ -18,6 +18,7 @@ The official Hugo [Hosting and Deployment](https://gohugo.io/hosting-and-deploym - [GitHub Pages](#github-pages) - [Netlify](#netlify) - [Render](#render) +- [Cloudflare Pages](#cloudflare-pages) - [Shared hosting, VPS or private web server](#shared-hosting-vps-or-private-web-server) --- @@ -119,6 +120,23 @@ Create a new **Static Site** and link it to your project's code repository. Then The site will automatically build and deploy whenever you push a change to your repo. +# Cloudflare Pages + +Cloudflare offers the [Pages](https://pages.cloudflare.com/) service that can host Hugo blogs. +It builds the site from a git repository and then hosts the site on Cloudflare's CDN. +Follow their [Hugo deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site) to get started. + +The Rocker Loader™ feature offered by Cloudflare tries to speed up rendering of web pages with javascript, but it breaks the appearance switcher. +It can also cause an annoying light/dark screen flash when browsing your site due to javascript loading in the wrong order. +Fix this problem by disabling it: + +* Go to the [Cloudflare dashboard](https://dash.cloudflare.com) +* Click on your domain name in the list +* Click _Optimization_ in the _Speed_ section +* Scroll down to _Rocket Loader™_ and disable it + +Hugo sites with the Congo theme still load very quickly even with this feature disabled. + ## Shared hosting, VPS or private web server Using traditional web hosting, or deploying to your own web server, is as simple as building your Hugo site and transferring the files to your host. From e13b30774adebb772994f3d6e7c5b06804bef72f Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Fri, 19 Aug 2022 08:51:16 +1000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Minor=20formatting=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/docs/hosting-deployment/index.md | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/exampleSite/content/docs/hosting-deployment/index.md b/exampleSite/content/docs/hosting-deployment/index.md index 4d860845..a88486cc 100644 --- a/exampleSite/content/docs/hosting-deployment/index.md +++ b/exampleSite/content/docs/hosting-deployment/index.md @@ -101,7 +101,7 @@ Then in the root of your site repository, create a `netlify.toml` file: [context.production.environment] HUGO_VERSION = "0.100.2" HUGO_ENV = "production" - + [context.deploy-preview.environment] HUGO_VERSION = "0.100.2" ``` @@ -120,22 +120,20 @@ Create a new **Static Site** and link it to your project's code repository. Then The site will automatically build and deploy whenever you push a change to your repo. -# Cloudflare Pages +## Cloudflare Pages -Cloudflare offers the [Pages](https://pages.cloudflare.com/) service that can host Hugo blogs. -It builds the site from a git repository and then hosts the site on Cloudflare's CDN. -Follow their [Hugo deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site) to get started. +Cloudflare offers the [Pages](https://pages.cloudflare.com/) service that can host Hugo blogs. It builds the site from a git repository and then hosts it on Cloudflare's CDN. Follow their [Hugo deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site) to get started. -The Rocker Loader™ feature offered by Cloudflare tries to speed up rendering of web pages with javascript, but it breaks the appearance switcher. -It can also cause an annoying light/dark screen flash when browsing your site due to javascript loading in the wrong order. -Fix this problem by disabling it: +The Rocket Loader™ feature offered by Cloudflare tries to speed up rendering of web pages with JavaScript, but it breaks the appearance switcher in the theme. It can also cause an annoying light/dark screen flash when browsing your site due to scripts loading in the wrong order. -* Go to the [Cloudflare dashboard](https://dash.cloudflare.com) -* Click on your domain name in the list -* Click _Optimization_ in the _Speed_ section -* Scroll down to _Rocket Loader™_ and disable it +This problem can be fixed by disabling it: -Hugo sites with the Congo theme still load very quickly even with this feature disabled. +- Go to the [Cloudflare dashboard](https://dash.cloudflare.com) +- Click on your domain name in the list +- Click _Optimization_ in the _Speed_ section +- Scroll down to _Rocket Loader™_ and disable it + +Hugo sites built with Congo still load very quickly, even with this feature disabled. ## Shared hosting, VPS or private web server