|
2 | 2 |
|
3 | 3 | [Docsy](https://github.com/google/docsy) is a Hugo theme for technical documentation sites, providing easy site navigation, structure, and more. This **Docsy Example Project** uses the Docsy theme, as well as providing a skeleton documentation structure for you to use. You can either copy this project and edit it with your own content, or use the theme in your projects like any other [Hugo theme](https://gohugo.io/themes/installing-and-using-themes/). |
4 | 4 |
|
| 5 | +The theme is included in this project as a Git submodule: |
| 6 | + |
| 7 | +```bash |
| 8 | +▶ git submodule |
| 9 | + a053131a4ebf6a59e4e8834a42368e248d98c01d themes/docsy (heads/master) |
| 10 | +``` |
| 11 | + |
5 | 12 | This Docsy Example Project is hosted at [https://example.docsy.dev/](https://example.docsy.dev/). |
6 | 13 |
|
7 | 14 | You can find detailed theme instructions in the Docsy user guide: https://docsy.dev/docs/ |
8 | 15 |
|
9 | 16 | This is not an officially supported Google product. This project is currently maintained. |
10 | 17 |
|
11 | | -## Cloning the Docsy Example Project |
12 | | - |
13 | | -The following will give you a project that is set up and ready to use (don't forget to use `--recurse-submodules` or you won't pull down some of the code you need to generate a working site). The `hugo server` command builds and serves the site. If you just want to build the site, run `hugo` instead. |
14 | | - |
15 | | -```bash |
16 | | -git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git |
17 | | -cd docsy-example |
18 | | -hugo server |
19 | | -``` |
20 | | - |
21 | | -The theme is included as a Git submodule: |
| 18 | +## Using the Docsy Example Project as a template |
22 | 19 |
|
23 | | -```bash |
24 | | -▶ git submodule |
25 | | - a053131a4ebf6a59e4e8834a42368e248d98c01d themes/docsy (heads/master) |
26 | | -``` |
| 20 | +A simple way to get started is to use this project as a template, which gives you a site project that is set up and ready to use. To do this: |
27 | 21 |
|
28 | | -If you want to do SCSS edits and want to publish these, you need to install `PostCSS` (not needed for `hugo server`): |
| 22 | +1. Click **Use this template**. |
29 | 23 |
|
30 | | -```bash |
31 | | -npm install |
32 | | -``` |
33 | | - |
34 | | -<!--### Cloning the Example from the Theme Project |
| 24 | +2. Select a name for your new project and click **Create repository from template**. |
35 | 25 |
|
| 26 | +3. Make your own local working copy of your new repo using git clone, replacing https://github.com/my/example.git with your repo’s web URL: |
36 | 27 |
|
37 | 28 | ```bash |
38 | | -git clone --recurse-submodules --depth 1 https://github.com/docsy.git |
39 | | -cd tech-doc-hugo-theme/exampleSite |
40 | | -HUGO_THEMESDIR="../.." hugo server |
| 29 | +git clone --recurse-submodules --depth 1 https://github.com/my/example.git |
41 | 30 | ``` |
42 | 31 |
|
| 32 | +You can now edit your local versions of the site’s source files. |
43 | 33 |
|
44 | | -Note that the Hugo Theme Site requires the `exampleSite` to live in a subfolder of the theme itself. To avoid recursive duplication, the example site is added as a Git subtree: |
| 34 | +If you want to do SCSS edits and want to publish these, you need to install `PostCSS` |
45 | 35 |
|
46 | 36 | ```bash |
47 | | -git subtree add --prefix exampleSite https://github.com/google/docsy.git master --squash |
| 37 | +npm install |
48 | 38 | ``` |
49 | 39 |
|
50 | | -To pull in changes, see `pull-deps.sh` script in the theme.--> |
51 | | - |
52 | 40 | ## Running the website locally |
53 | 41 |
|
54 | | -Once you've cloned the site repo, from the repo root folder, run: |
| 42 | +Once you've cloned or copied the site repo, from the repo root folder, run: |
55 | 43 |
|
56 | 44 | ``` |
57 | 45 | hugo server |
58 | 46 | ``` |
59 | 47 |
|
60 | | -### Running a container locally |
| 48 | +## Running a container locally |
61 | 49 |
|
62 | 50 | You can run docsy-example inside a [Docker](ihttps://docs.docker.com/) |
63 | 51 | container, the container runs with a volume bound to the `docsy-example` |
|
0 commit comments