Create a new site: start with a prepopulated site

Clone the example site and adapt it: a ready-made site structure with a pinned toolchain.

The Docsy example site gives you a skeleton structure for your site, with top-level and documentation sections and templates that you can modify as necessary.

If you prefer to create a site from scratch, follow Start a site from scratch.

TL;DR: Setup for the impatient expert

With the prerequisites installed (on Windows, including Bash on your PATH), run:

git clone --depth 1 --branch v0.16.0 https://github.com/google/docsy-example.git my-new-site
cd my-new-site
npm run install:safe
npm run serve

Preview at http://localhost:1313/. If the build fails, see Troubleshooting.

Detailed Setup instructions

Clone the Docsy example site

There are two routes to get a local clone of the example site:

Option 1: Using the command line (local copy only)

For a local copy or a non-GitHub remote, clone the released example site, giving your chosen local repo name (here: my-new-site) as the last parameter:

git clone --depth 1 --branch v0.16.0 https://github.com/google/docsy-example.git my-new-site

Option 2: Using the GitHub UI (local copy + associated GitHub repo)

The example site is a template repository, so you can generate your own GitHub repository from it. Note that a template copies the example site’s default branch (main), which can be ahead of the latest release; for a release-pinned start, use option 1.

  1. Go to the repo of the Docsy example site.

  2. Click the button Use this template and select the option Create a new repository from the dropdown.

  3. Choose a name for your new repository (e.g. my-new-site) and type it in the Repository name field. You can also add an optional Description.

  4. Click Create repository from template to create your new repository.

  5. Make a local copy of your newly created GitHub repository by using git clone, giving your repo’s web URL as last parameter.

    git clone https://github.com/me-at-github/my-new-site.git
    

Preview your site

To build and preview your site locally, switch to the root of your cloned project, install the project dependencies, and serve the site:

cd my-new-site
npm run install:safe
npm run serve

Preview at http://localhost:1313/. Hugo reloads the preview as you edit. Press Ctrl + c to stop the server. If the build fails, see Troubleshooting.

What’s next?