You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: userguide/content/en/docs/Contribution guidelines/_index.md
+13-15
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,7 @@
1
1
---
2
-
title: "Contribution Guidelines"
3
-
linkTitle: "Contribution Guidelines"
2
+
title: Contribution Guidelines
4
3
weight: 9
5
-
description: >
6
-
How to contribute to Docsy
4
+
description: How to contribute to Docsy
7
5
---
8
6
9
7
Docsy is an open source project and we love getting patches and contributions to make Docsy and its docs even better.
@@ -54,15 +52,15 @@ We use [Netlify](https://www.netlify.com/) to manage the deployment of the site
54
52
55
53
1. Fork the [Docsy repo](https://github.com/google/docsy) on GitHub: this site's files live in the `userguide` subdirectory.
56
54
1. Make your changes and send a pull request (PR).
57
-
1. If you're not yet ready for a review, add "WIP" to the PR name to indicate
58
-
it's a work in progress. (**Don't** add the Hugo property
59
-
"draft = true" to the page front matter, because that prevents the
55
+
1. If you're not yet ready for a review, add "WIP" to the PR name to indicate
56
+
it's a work in progress. (**Don't** add the Hugo property
57
+
"draft = true" to the page front matter, because that prevents the
60
58
auto-deployment of the content preview described in the next point.)
61
59
1. Wait for the automated PR workflow to do some checks. When it's ready,
62
60
you should see a comment like this: **deploy/netlify — Deploy preview ready!**
63
61
1. Click **Details** to the right of "Deploy preview ready" to see a preview
64
62
of your updates.
65
-
1. Continue updating your doc and pushing your changes until you're happy with
63
+
1. Continue updating your doc and pushing your changes until you're happy with
66
64
the content.
67
65
1. When you're ready for a review, add a comment to the PR, and remove any
68
66
"WIP" markers.
@@ -81,22 +79,22 @@ If you've just spotted something you'd like to change while using the docs, Docs
81
79
If you want to run your own local Hugo server to preview your changes as you work:
82
80
83
81
1. Follow the instructions in [Getting started](/docs/getting-started) to install Hugo and any other tools you need.
84
-
1. Fork the [Docsy](https://github.com/google/docsy) repo into your own project, then create a local copy using `git clone`. Don’t forget to use `--recurse-submodules` or you won’t pull down some of the code you need to generate a working site.
82
+
1. Fork the [Docsy](https://github.com/google/docsy) repo into your own project, then create a local copy using `git clone`:
1. Change to the `userguide` directory and run the following Hugo command to build the site and start the Hugo server.
91
89
Note that you need the `themesDir` flag because the site files are inside the theme repo.
92
90
93
-
```
91
+
```sh
94
92
cd userguide
95
93
hugo server --themesDir ../..
96
94
```
97
-
95
+
98
96
By default your site will be available at http://localhost:1313/. Now that you're serving your site locally, Hugo will watch for changes to the content and automatically refresh your site.
99
-
97
+
100
98
1. Continue with the usual GitHub workflow to edit files, commit them, push the
101
99
changes up to your fork, and create a pull request.
102
100
@@ -111,7 +109,7 @@ locally with Docker, without installing any additional dependencies.
111
109
112
110
```bash
113
111
docker build -t docsy/user-guide .
114
-
```
112
+
```
115
113
116
114
1. Run the container, mounting the repository as a shared volume:
Copy file name to clipboardexpand all lines: userguide/content/en/docs/Deployment/_index.md
+4-16
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,7 @@
1
1
---
2
-
title: "Previews and Deployment"
3
-
linkTitle: "Previews and Deployment"
2
+
title: Previews and Deployment
4
3
weight: 7
5
-
description: >
6
-
Deploying your Docsy site.
4
+
description: Deploying your Docsy site.
7
5
---
8
6
9
7
There are multiple possible options for deploying a Hugo site, including Netlify, Firebase Hosting, Bitbucket with Aerobatic, and more; you can read about them all in [Hosting and Deployment](https://gohugo.io/hosting-and-deployment/). Hugo also makes it easy to deploy your site locally for quick previews of your content.
@@ -12,20 +10,10 @@ There are multiple possible options for deploying a Hugo site, including Netlify
12
10
13
11
Depending on your deployment choice you may want to serve your site locally during development to preview content changes. To serve your site locally:
14
12
15
-
1. Ensure you have an up to date local copy of your site files cloned from your repo. Don't forget to use `--recurse-submodules` or you won't pull down some of the code you need to generate a working site.
If you've just added the theme as a submodule in a local version of your site and haven't committed it to a repo yet, you must get local copies of the theme's own submodules before serving your site.
23
-
24
-
git submodule update --init --recursive
25
-
{{% /alert %}}
13
+
1. Ensure you have an up to date local copy of your site files cloned from your repo.
26
14
27
15
1. Ensure you have the tools described in [Prerequisites and installation](/docs/get-started/docsy-as-module/installation-prerequisites) installed on your local machine, including `postcss-cli` (you'll need it to generate the site resources the first time you run the server).
28
-
1. Run the `hugo server` command in your site root. By default your site will be available at http://localhost:1313/.
16
+
1. Run the `hugo server` command in your site root. By default your site will be available at <http://localhost:1313>.
29
17
30
18
Now that you're serving your site locally, Hugo will watch for changes to the content and automatically refresh your site. If you have more than one local git branch, when you switch between git branches the local website reflects the files in the current branch.
Copy file name to clipboardexpand all lines: userguide/content/en/docs/Get started/_index.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,12 @@
1
1
2
2
---
3
-
title: "Get started"
4
-
linkTitle: "Get started"
3
+
title: Get started
5
4
weight: 2
6
-
aliases:
7
-
- /docs/getting-started/
5
+
aliases: [/docs/getting-started/]
8
6
date: 2018-07-30
9
-
description: >
10
-
Learn how to get started with Docsy, including the available options for installing and using the Docsy theme.
7
+
description:
8
+
Learn how to get started with Docsy, including the available options for
9
+
installing and using the Docsy theme.
11
10
---
12
11
13
12
As you saw in our introduction, Docsy is a [Hugo](https://gohugo.io) theme, which means that if you want to use Docsy, you need to set up your website source so that the Hugo static site generator can find and use the Docsy theme files when building your site. The simplest way to do this is to copy and edit our example site, though we also provide instructions for adding the Docsy theme manually to new or existing sites.
Copy file name to clipboardexpand all lines: userguide/content/en/docs/Get started/other-options.md
+55-33
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
---
2
-
title: "Other setup options"
3
-
linkTitle: "Other setup options"
2
+
title: Other setup options
4
3
date: 2021-12-08T09:22:27+01:00
5
4
weight: 2
6
-
description:>
5
+
description:
7
6
Create a new Docsy site with Docsy as a Git submodule or cloned theme
8
7
---
9
8
@@ -15,9 +14,9 @@ This guide provides instructions for both these options, along with common prere
15
14
16
15
## Prerequisites and installation
17
16
18
-
### Install Hugo
17
+
### Install Hugo
19
18
20
-
You need a [recent **extended** version](https://github.com/gohugoio/hugo/releases) (we recommend version 0.73.0 or later) of [Hugo](https://gohugo.io/) to do local builds and previews of sites (like this one) that use Docsy. If you install from the release page, make sure to get the `extended` Hugo version, which supports [SCSS](https://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html); you may need to scroll down the list of releases to see it.
19
+
You need a [recent **extended** version](https://github.com/gohugoio/hugo/releases) (we recommend version 0.73.0 or later) of [Hugo](https://gohugo.io/) to do local builds and previews of sites (like this one) that use Docsy. If you install from the release page, make sure to get the `extended` Hugo version, which supports [SCSS](https://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html); you may need to scroll down the list of releases to see it.
21
20
22
21
For comprehensive Hugo documentation, see [gohugo.io](https://gohugo.io/).
23
22
@@ -30,8 +29,9 @@ If you've already installed Hugo, check your version:
30
29
```
31
30
hugo version
32
31
```
32
+
33
33
If the result is `v0.73` or earlier, or if you don't see `Extended`, you'll need to install the latest version. You can see a complete list of Linux installation options in [Install Hugo](https://gohugo.io/getting-started/installing/#linux). The following shows you how to install Hugo from the release page:
34
-
34
+
35
35
1. Go to the [Hugo releases](https://github.com/gohugoio/hugo/releases) page.
36
36
2. In the most recent release, scroll down until you find a list of
37
37
**Extended** versions.
@@ -48,7 +48,7 @@ If the result is `v0.73` or earlier, or if you don't see `Extended`, you'll need
48
48
49
49
7. Install Hugo:
50
50
51
-
sudo install hugo /usr/bin
51
+
sudo install hugo /usr/bin
52
52
53
53
#### On macOS
54
54
@@ -81,42 +81,64 @@ npm install -D postcss
81
81
82
82
Note that versions of `PostCSS` later than 5.0.1 will not load `autoprefixer` if installed [globally](https://flaviocopes.com/npm-packages-local-global/), you must use a local install.
83
83
84
-
## Other option 1: Use the theme as a submodule
84
+
## Option 1: Docsy as a Git submodule
85
85
86
-
To create a new Hugo site project and then add the Docsy theme as a submodule, run the following commands from your project's root directory.
86
+
To create a **new site** and add the Docsy theme as a Git submodule, run the
If you don't want to use a submodules (for example, if you want to customize and maintain your own copy of the theme directly, or your deployment choice requires you to include a copy of the theme in your repository), you can clone the theme into your project's `themes` subdirectory.
129
+
If you don't want to use a submodules (for example, if you want to customize and
130
+
maintain your own copy of the theme directly, or your deployment choice requires
131
+
you to include a copy of the theme in your repository), you can clone the theme
132
+
into your project's `themes` subdirectory.
108
133
109
-
To clone Docsy into your project's `theme` folder, run the following commands from your project's root directory:
134
+
To clone Docsy into your project's `theme` folder, run the following commands
If you want to build and/or serve your site [locally](/docs/deployment/#serving-your-site-locally), you also need to get local copies of the theme’s own submodules:
117
-
118
-
```
119
-
git submodule update --init --recursive
140
+
cd docsy
141
+
npm install
120
142
```
121
143
122
144
For more information, see [Theme Components](https://gohugo.io/hugo-modules/theme-components/) on the [Hugo](https://gohugo.io) site.
@@ -129,8 +151,8 @@ To build and preview your site locally:
129
151
cd myproject
130
152
hugo server
131
153
```
132
-
133
-
By default, your site will be available at http://localhost:1313/. [See the known issues on MacOS](/docs/get-started/known_issues/#macos).
154
+
155
+
By default, your site will be available at <http://localhost:1313>. [See the known issues on MacOS](/docs/get-started/known_issues/#macos).
134
156
135
157
You may get Hugo errors for missing parameters and values when you try to build your site. This is usually because you’re missing default values for some configuration settings that Docsy uses - once you add them your site should build correctly. You can find out how to add configuration in [Basic site configuration](/docs/get-started/basic-configuration/) - we recommend copying the example site configuration even if you’re creating a site from scratch as it provides defaults for many required configuration parameters.
0 commit comments