hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

hosting-on-render.md (3687B)

    1 ---
    2 title: Host on Render
    3 linktitle: Host on Render
    4 description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
    5 date: 2019-06-06
    6 publishdate: 2019-06-06
    7 categories: [hosting and deployment]
    8 keywords: [hosting,deployment]
    9 authors: [Anurag Goel]
   10 menu:
   11   docs:
   12     parent: "hosting-and-deployment"
   13     weight: 10
   14 weight: 10
   15 sections_weight: 10
   16 draft: false
   17 aliases: []
   18 toc: true
   19 ---
   20 
   21 ## Introduction
   22 
   23 [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.
   24 
   25 Static sites are **completely free** on Render and include the following:
   26 
   27 - Continuous, automatic builds & deploys from [GitHub](https://render.com/docs/github) and [GitLab](https://render.com/docs/gitlab).
   28 - Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org).
   29 - Instant cache invalidation with a lightning fast, global CDN.
   30 - Unlimited collaborators.
   31 - Unlimited [custom domains](https://render.com/docs/custom-domains).
   32 - Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites.
   33 - Native HTTP/2 support.
   34 - [Pull Request Previews](https://render.com/docs/pull-request-previews).
   35 - Automatic HTTP → HTTPS redirects.
   36 - Custom URL redirects and rewrites.
   37 
   38 ## Assumptions
   39 
   40 * You have an account with GitHub or GitLab.
   41 * You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world.
   42 * You have a Render account. You can sign up at https://render.com/register.
   43 
   44 ## Deployment
   45 
   46 You can set up a Hugo site on Render in two quick steps:
   47 
   48 1. Create a new **Static Site** on Render, and give Render permission to access your GitHub/Gitlab repo.
   49 2. Use the following values during creation:
   50 
   51   Field                | Value
   52   -------------------  |  -------------------
   53  **Build Command**     | `hugo --gc --minify` (or your own build command)
   54  **Publish Directory** | `public` (or your own output directory)
   55 
   56 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.
   57 
   58 ## Continuous Deploys
   59 
   60 Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to your GitHub/Gitlab.
   61 
   62 You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard.
   63 
   64 ## CDN and Cache Invalidation
   65 
   66 Render hosts your site on a global, lightning fast CDN which ensures the fastest possible download times for all your users across the globe.
   67 
   68 Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
   69 
   70 ## Custom Domains
   71 
   72 Add your own domains to your site easily using Render's [custom domains](https://render.com/docs/custom-domains) guide.
   73 
   74 ## Pull Request Previews
   75 
   76 With Pull Request (PR) previews, you can visualize changes introduced in a pull request instead of simply relying on code reviews.
   77 
   78 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.
   79 
   80 Read more about [Pull Request Previews](https://render.com/docs/pull-request-previews) on Render.
   81 
   82 ## Hugo Themes
   83 
   84 Render automatically downloads all Git submodules defined in your Git repo on every build. This way Hugo themes added as submodules work as expected.
   85 
   86 ## Support
   87 
   88 Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
   89 
   90 [Quick Start]: /getting-started/quick-start/