hugo/docs/content/en/hosting-and-deployment/hosting-on-render.md

94 lines
3.6 KiB
Markdown
Raw Normal View History

Squashed 'docs/' changes from 0c3c04fd6..540aeddc7 540aeddc7 Small fixes for Open Graph internal template 47bbb3fd7 Bump lodash.template from 4.4.0 to 4.5.0 in /themes/gohugoioTheme 64c1cc3db Update title.md 36c27be37 Update configuration.md 4627cfe9a added commento.io to the list 341d9d945 Fix link to font assets 4a6876dec Small typo fix in configuration.md 736d6ddd7 Add bypasscensorship.org showcase. de7ab636b Use actual width in image processing examples 6c88ab2da Update directory-structure.md 88f559e81 Fix spelling mistakes 7bd427141 Rephrase four points from Hosting on Github docs bce1b1832 Fix typos for absLangURL and relLangURL functions abab57335 Update directory-structure.md a6716f2ed Fix metadata list 5ef61d912 Fix typo d9e467b8b Actuall show how to generate pages in quickstart 0aadc92e7 Update link to issue theme submission b1902faaa Remove incorrect note about Hugo snap --classic use. d451e7362 Update documentation on page variables ab2233c39 Update publish_to_ghpages.sh 7c120346b Fix typo in syntax highlighting page. f01dc555d Correct some typos be825ade9 Videos plural produces og:video bc962fbdf Updated installing.md file to include linuxbrew installation 08c9f8fc8 Mention 1 MB file size limit in readFile doc 7145e29e2 Fixes bad URL in menus.md for .hasChildren * part of issue #814 0edbd59c4 add warning about .Hugo variable being deprecated 77f74ced5 fix: typo in output-formats.md f71b67f34 Correct typo "RFC339" to "RFC1123Z" (#837) 424c0207a baseurl -> baseURL f4e24a03e Render launched; no invite code needed 37e1101d3 Add Render hosting guide 01d0a6481 Bump js-yaml from 3.12.0 to 3.13.1 in /themes/gohugoioTheme edb7b36b0 Link site hierarchy schema to larger version af72acda0 Fixes typo in fingerprint.md 0a738467b Adding required XML tag to sample templates 52211f656 Remove note that XML declaration is not needed a39b9ac87 Adding required XML tag to sample templates 1a44d8a50 Add configuration information for Azure 5b7c6b5a1 remove google plus 5a64301ba HTTPS link to yaml.org/spec/ git-subtree-dir: docs git-subtree-split: 540aeddc797658a2c3d0e49e944592d2b23b3bb8
2019-07-15 21:49:41 +00:00
---
title: Host on Render
linktitle: Host on Render
description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
date: 2019-06-06
publishdate: 2019-06-06
lastmod: 2019-06-21
categories: [hosting and deployment]
keywords: [render,hosting,deployment]
authors: [Anurag Goel]
menu:
docs:
parent: "hosting-and-deployment"
weight: 10
weight: 10
sections_weight: 10
draft: false
aliases: []
toc: true
---
## Introduction
[Render](https://render.com) is a fully-managed cloud platform where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place.
Static sites are **completely free** on Render and include the following:
- Continuous, automatic builds & deploys from GitHub.
- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org).
- Instant cache invalidation with a lightning fast, global CDN.
- Unlimited collaborators.
- Unlimited [custom domains](https://render.com/docs/custom-domains).
- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites.
- Native HTTP/2 support.
- [Pull Request Previews](https://render.com/docs/pull-request-previews).
- Automatic HTTP → HTTPS redirects.
- Custom URL redirects and rewrites.
## Assumptions
* You have an account with GitHub.
* You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world.
* You have a Render account. You can sign up at https://render.com/register.
## Deployment
You can set up a Hugo site on Render in two quick steps:
1. Create a new **Web Service** on Render, and give Render permission to access your GitHub repo.
2. Use the following values during creation:
Field | Value
------------------- | -------------------
**Environment** | `Static Site`
**Build Command** | `hugo --gc --minify` (or our own build command)
**Publish Directory** | `public` (or your own output directory)
That's it! Your site will be live on your Render URL (which looks like `yoursite.onrender.com`) as soon as the build is done.
## Continuous Deploys
Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to GitHub.
You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard.
## CDN and Cache Invalidation
Render hosts your site on a global, lightning fast CDN which ensures the fastest possible download times for all your users across the globe.
Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
## Custom Domains
Add your own domains to your site easily using Render's [custom domains](https://render.com/docs/custom-domains) guide.
## Pull Request Previews
With Pull Request (PR) previews, you can visualize changes introduced in a pull request instead of simply relying on code reviews.
Once enabled, every PR for your site will automatically generate a new static site based on the code in the PR. It will have its own URL, and it will be deleted automatically when the PR is closed.
Read more about [Pull Request Previews](https://render.com/docs/pull-request-previews) on Render.
## Hugo Themes
Render automatically downloads all Git submodules defined in your Git repo on every build. This way Hugo themes added as submodules work as expected.
## Support
Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
[Quick Start]: /getting-started/quick-start/