<!doctype html><htmllang=en-audir=ltrclass=scroll-smoothdata-default-appearance=lightdata-auto-appearance=true><head><metacharset=utf-8><metahttp-equiv=content-languagecontent="en-au"><metaname=viewportcontent="width=device-width,initial-scale=1"><metahttp-equiv=x-ua-compatiblecontent="ie=edge"><title>Hosting & Deployment · Congo</title><metaname=titlecontent="Hosting & Deployment · Congo"><metaname=descriptioncontent="A powerful, lightweight theme for Hugo built with Tailwind CSS."><linkrel=canonicalhref=https://jpanther.github.io/congo/docs/hosting-deployment/><linktype=text/cssrel=stylesheethref=/congo/css/main.bundle.min.3552466d62941f854cc764b706ab5b2e3616325dd23313577f99ff83f095a09e436d4734656eb0ab9f588d93c251fdf636660a728c2f6ccb49697325daac8a6c.cssintegrity="sha512-NVJGbWKUH4VMx2S3BqtbLjYWMl3SMxNXf5n/g/CVoJ5DbUc0ZW6wq59YjZPCUf32NmYKcowvbMtJaXMl2qyKbA=="><scripttype=text/javascriptsrc=/congo/js/appearance.min.badab316c9287a5a42a843e4eb45da65bb3d194a5a0f5fa4a3e516160e67df0b8c65f4f19a8e146436e29d583699e6cb41d6bbe99e05e1dbaa877763bad9f8e2.jsintegrity="sha512-utqzFskoelpCqEPk60XaZbs9GUpaD1+ko+UWFg5n3wuMZfTxmo4UZDbinVg2mebLQda76Z4F4duqh3djutn44g=="></script>
<spanclass=mb-[2px]><ahref=https://github.com/jpanther/congo/tree/dev/exampleSite/content/docs/hosting-deployment/index.mdclass="text-lg hover:text-primary-500"rel="noopener noreferrer"target=_blanktitle="Edit content"><spanclass="relative inline-block align-text-bottom icon"><svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><pathfill="currentcolor"d="M490.3 40.4c21.9 21.87 21.9 57.33.0 79.2l-30 30.1-98-97.98 30.1-30.06C414.3-.2135 449.7-.2135 471.6 21.66L490.3 40.4zM172.4 241.7 339.7 74.34l98 97.96L270.3 339.6C264.2 345.8 256.7 350.4 248.4 353.2l-88.8 29.6C150.1 385.6 141.5 383.4 135 376.1 128.6 370.5 126.4 361 129.2 352.4l29.6-88.8C161.6 255.3 166.2 247.8 172.4 241.7v0zM192 63.1c17.7.0 32 15.23 32 32 0 18.6-14.3 32-32 32H96c-17.67.0-32 15.2-32 32V416c0 17.7 14.33 32 32 32H352c17.7.0 32-14.3 32-32V319.1c0-16.8 14.3-32 32-32s32 15.2 32 32V416c0 53-43 96-96 96H96c-53.02.0-96-43-96-96V159.1c0-53 42.98-96 96-96h96z"/></svg></span></a></span></div></div></header><sectionclass="flex flex-col max-w-full mt-0 prose lg:flex-row dark:prose-invert"><divclass="order-first px-0 lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8 lg:order-last"><divclass="ltr:pl-5 rtl:pr-5 toc lg:sticky lg:top-10 print:hidden"><detailsopenclass="mt-0 overflow-hidden rounded-lg rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5"><summaryclass="block py-1 text-lg font-semibold cursor-pointer rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 text-neutral-800 dark:text-neutral-100 lg:hidden bg-neutral-100 dark:bg-neutral-700">Table of Contents</summary><divclass="py-2 border-dotted ltr:border-l rtl:border-r rtl:pr-5 ltr:pl-5 ltr:-ml-5 rtl:-mr-5 border-neutral-300 dark:border-neutral-600"><navid=TableOfContents><ul><li><ahref=#github-pages>GitHub Pages</a></li><li><ahref=#netlify>Netlify</a></li><li><ahref=#render>Render</a></li><li><ahref=#shared-hosting-vps-or-private-web-server>Shared hosting, VPS or private web server</a></li></ul></nav></div></details></div></div><divclass="min-w-0 min-h-0 max-w-prose"><p>There are many ways to deploy your Hugo website built with Congo. The theme is designed to be flexible in almost any deployment scenario.</p><p>Congo is built using relative URLs throughout the theme. This enables sites to easily be deployed to sub-folders and hosts like GitHub Pages. There’s usually no special configuration required for this to work as long as the <code>baseURL</code> parameter has been configured in the <code>config.toml</code> file.</p><p>The official Hugo <ahref=https://gohugo.io/hosting-and-deployment/>Hosting and Deployment</a> docs are the best place to learn how to deploy your site. The sections below contain some specific theme configuration details that can help you deploy smoothly with certain providers.</p><p><strong>Choose your provider:</strong></p><ul><li><ahref=#github-pages>GitHub Pages</a></li><li><ahref=#netlify>Netlify</a></li><li><ahref=#render>Render</a></li><li><ahref=#shared-hosting-vps-or-private-web-server>Shared hosting, VPS or private web server</a></li></ul><hr><h2id=github-pagesclass="relative group">GitHub Pages <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#github-pagesaria-label=Anchor>#</a></span></h2><p>GitHub allows hosting on <ahref=https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages>GitHub Pages</a> using Actions. To enable this functionality, enable Pages on your repo and create a new Actions workflow to build and deploy your site.</p><p>The file needs to be in YAML format, placed within the <code>.github/workflows/</code> directory of your GitHub repository and named with a <code>.yml</code> extension.</p><divclass="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900"><spanclass="ltr:pr-3 rtl:pl-3 text-primary-400"><spanclass="relative inline-block align-text-bottom icon"><svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><pathfill="cu
</span></span></span></code></pre></div><p>Push the config file to GitHub and the action should automatically run. It may fail the first time and you’ll need to visit the <strong>Settings > Pages</strong> section of your GitHub repo to check the source is correct. It should be set to use the <code>gh-pages</code> branch.</p><figure><imgsrc=/congo/docs/hosting-deployment/github-pages-source.jpgalt="Screen capture of GitHub Pages source"width=100%height=autostyle=max-width:565px;max-height:95px></figure><p>Once the settings are configured, re-run the action and the site should build and deploy correctly. You can consult the actions log to check everything deployed successfully.</p><h2id=netlifyclass="relative group">Netlify <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#netlifyaria-label=Anchor>#</a></span></h2><p>To deploy to <ahref=https://www.netlify.com>Netlify</a>, create a new continuous deployment site and link it to your source code. The build settings can be left blank in the Netlify UI. You will only need to configure the domain you’ll be using.</p><figure><imgsrc=/congo/docs/hosting-deployment/netlify-build-settings.jpgalt="Screen capture of Netlify build settings"width=100%height=autostyle=max-width:479px;max-height:331px></figure><p>Then in the root of your site repository, create a <code>netlify.toml</code> file:</p><divclass=highlight><pretabindex=0class=chroma><codeclass=language-tomldata-lang=toml><spanclass=line><spanclass=cl><spanclass=c># netlify.toml</span>
</span></span><spanclass=line><spanclass=cl><spanclass=nx>command</span><spanclass=p>=</span><spanclass=s2>"hugo mod get -u && hugo --gc --minify -b $URL"</span>
</span></span><spanclass=line><spanclass=cl><spanclass=nx>TZ</span><spanclass=p>=</span><spanclass=s2>"UTC"</span><spanclass=c># Set to preferred timezone</span>
</span></span></code></pre></div><p>This configuration assumes you are deploying Congo as a Hugo module. If you have installed the theme using another method, change the build command to simply <code>hugo --gc --minify -b $URL</code>.</p><p>When you push the config file to your repo, Netlify should automatically deploy your site. You can check the deploy logs in the Netlify UI to check for any errors.</p><h2id=renderclass="relative group">Render <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#renderaria-label=Anchor>#</a></span></h2><p>Deploying to <ahref=https://render.com>Render</a> is very straightforward and all configuration is via the Render UI.</p><p>Create a new <strong>Static Site</strong> and link it to your project’s code repository. Then simply configure the build command to be <code>hugo --gc --minify</code> and publish directory to be <code>public</code>.</p><figure><imgsrc=/congo/docs/hosting-deployment/render-settings.jpgalt="Screen capture of Render settings"width=100%height=autostyle=max-width:628px;max-height:227px></figure><p>The site will automatically build and deploy whenever you push a change to your repo.</p><h2id=shared-hosting-vps-or-private-web-serverclass="relative group">Shared hosting, VPS or private web server <spanclass="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100"><aclass="group-hover:text-primary-300 dark:group-hover:text-neutral-700"style=text-decoration-line:none!importanthref=#shared-hosting-vps-or-private-web-serveraria-label=Anchor>#</a></span></h2><p>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.</p><p>Make sure that the <code>baseURL</code> parameter in <code>config.toml</code> is set to the full URL to the root of your website (including any sub domains or sub-folders).</p><p>Then build your site using <code>hugo</code> and copy the contents of the output directory to the root of your web server and you will be ready to go. By default, the output directory is named <code>public</code>.</p><p><em>If you need a hosting provider, check out <ahref="https://www.vultr.com/?ref=8957394-8H">Vultr</a> or <ahref=https://m.do.co/c/36841235e565>DigitalOcean</a>. Signing up using these affiliate links will give you up to $100 in free credit so you can try the service.</em></p></div></section><footerclass="pt-8 max-w-prose print:hidden"><divclass=pt-8><hrclass="border-dotted border-neutral-300 dark:border-neutral-600"><divclass="flex justify-between pt-3"><span><aclass="flex group"href=/congo/docs/advanced-customisation/><spanclass="mr-3 ltr:inline rtl:hidden text-neutral-700 dark:text-neutral group-hover:text-primary-600 dark:group-hover:text-primary-400">←</span>