-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50399b4
commit b6f3694
Showing
48 changed files
with
2,645 additions
and
18,768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
public | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM klakegg/hugo:ext-alpine | ||
FROM floryn90/hugo:ext-alpine | ||
|
||
RUN apk add git && \ | ||
git config --global --add safe.directory /src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
# Docsy Example | ||
## 🚧 WARNING: `main` is unstable! For details, see [#207](https://github.com/google/docsy-example/issues/207) 🚧 | ||
|
||
[Docsy][] is a [Hugo theme module][] for technical documentation sites, providing easy | ||
site navigation, structure, and more. This **Docsy Example Project** uses the Docsy | ||
theme component as a hugo module and provides a skeleton documentation structure for you to use. | ||
You can clone/copy this project and edit it with your own content, or use it as an example. | ||
|
||
In this project, the Docsy theme component is pulled in as a Hugo module, together with other module dependencies: | ||
In this project, the Docsy theme is pulled in as a Hugo module, together with | ||
its dependencies: | ||
|
||
```console | ||
$ hugo mod graph | ||
hugo: collected modules in 566 ms | ||
hugo: collected modules in 578 ms | ||
github.com/google/docsy-example github.com/google/[email protected] | ||
github.com/google/docsy-example github.com/google/docsy/[email protected] | ||
github.com/google/docsy/[email protected] github.com/twbs/[email protected]+incompatible | ||
github.com/google/docsy/[email protected] github.com/FortAwesome/[email protected] | ||
... | ||
``` | ||
|
||
You can find detailed theme instructions in the [Docsy user guide][]. | ||
For Docsy documentation, see [Docsy user guide][]. | ||
|
||
This Docsy Example Project is hosted on [Netlify][] at [example.docsy.dev][]. | ||
You can view deploy logs from the [deploy section of the project's Netlify | ||
|
@@ -30,11 +25,13 @@ This is not an officially supported Google product. This project is currently ma | |
|
||
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: | ||
|
||
1. Click **Use this template**. | ||
1. Use the dropdown for switching branches/tags to change to the **latest** released tag. | ||
|
||
2. Select a name for your new project and click **Create repository from template**. | ||
2. Click **Use this template**. | ||
|
||
3. Make your own local working copy of your new repo using git clone, replacing https://github.com/me/example.git with your repo’s web URL: | ||
3. Select a name for your new project and click **Create repository from template**. | ||
|
||
4. Make your own local working copy of your new repo using git clone, replacing https://github.com/me/example.git with your repo’s web URL: | ||
|
||
```bash | ||
git clone --depth 1 https://github.com/me/example.git | ||
|
@@ -99,13 +96,60 @@ To remove the produced images run: | |
```bash | ||
docker-compose rm | ||
``` | ||
For more information see the [Docker Compose | ||
documentation](https://docs.docker.com/compose/gettingstarted/). | ||
For more information see the [Docker Compose documentation][]. | ||
|
||
## Using a local Docsy clone | ||
|
||
Make sure your installed go version is `1.18` or higher. | ||
|
||
Clone the latest version of the docsy theme into the parent folder of your project. The newly created repo should now reside in a sibling folder of your site's root folder. | ||
|
||
```shell | ||
cd root-of-your-site | ||
git clone --branch v0.7.2 https://github.com/google/docsy.git ../docsy | ||
``` | ||
|
||
Now run: | ||
|
||
```shell | ||
HUGO_MODULE_WORKSPACE=docsy.work hugo server --ignoreVendorPaths "**" | ||
``` | ||
|
||
or, when using npm, prepend `local` to the script you want to invoke, e.g.: | ||
|
||
```shell | ||
npm run local serve | ||
``` | ||
|
||
By using the `HUGO_MODULE_WORKSPACE` directive (either directly or via prefix `local` when using npm), the server now watches all files and directories inside the sibling directory `../docsy` , too. Any changes inside the local `docsy` theme clone are now immediately picked up (hot reload), you can instantly see the effect of your local edits. | ||
|
||
In the command above, we used the environment variable `HUGO_MODULE_WORKSPACE` to tell hugo about the local workspace file `docsy.work`. Alternatively, you can declare the workspace file inside your settings file `hugo.toml`: | ||
|
||
```toml | ||
[module] | ||
workspace = "docsy.work" | ||
``` | ||
|
||
Your project's `hugo.toml` file already contains these lines, the directive for workspace assignment is commented out, however. Remove the two trailing comment characters '//' so that this line takes effect. | ||
|
||
## Troubleshooting | ||
|
||
As you run the website locally, you may run into the following error: | ||
|
||
```console | ||
$ hugo server | ||
WARN 2023/06/27 16:59:06 Module "project" is not compatible with this Hugo version; run "hugo mod graph" for more information. | ||
Start building sites … | ||
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio | ||
Error: Error building site: "C:\Users\foo\path\to\docsy-example\content\en\_index.md:5:1": failed to extract shortcode: template for shortcode "blocks/cover" not found | ||
Built in 27 ms | ||
``` | ||
|
||
This error occurs if you are running an outdated version of Hugo. As of docsy theme version `v0.7.0`, hugo version `0.110.0` or higher is required. | ||
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-hugo) of the user guide for instructions on how to install Hugo. | ||
|
||
Or you may be confronted with the following error: | ||
|
||
```console | ||
$ hugo server | ||
|
||
|
@@ -137,3 +181,4 @@ See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/instal | |
[example.docsy.dev]: https://example.docsy.dev | ||
[Hugo theme module]: https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme | ||
[Netlify]: https://netlify.com | ||
[Docker Compose documentation]: https://docs.docker.com/compose/gettingstarted/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# THIS IS A TEST CONFIG ONLY! | ||
# FOR THE CONFIGURATION OF YOUR SITE USE hugo.yaml. | ||
# | ||
# As of Docsy 0.7.0, Hugo 0.110.0 or later must be used. | ||
# | ||
# The sole purpose of this config file is to detect Hugo-module builds that use | ||
# an older version of Hugo. | ||
# | ||
# DO NOT add any config parameters to this file. You can safely delete this file | ||
# if your project is using the required Hugo version. | ||
|
||
module: | ||
hugoVersion: | ||
extended: true | ||
min: 0.110.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: "3.3" | ||
version: "3.8" | ||
|
||
services: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
go 1.19 | ||
|
||
use . | ||
use ../docsy/ // Local docsy clone resides in sibling folder to this project | ||
// use ./themes/docsy/ // Local docsy clone resides in themes folder |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,4 @@ | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f h1:bvkUptSRPZBr3Kxuk+bnWCEmQ5MtEJX5fjezyV0bC3g= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20221115183454-96cafbd73ec4 h1:xfr9SidRCMEh4A8fdkLhFPcHAVbrdv3Ua0Jp/nSmhhQ= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20221115183454-96cafbd73ec4/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 h1:Uv1z5EqCfmiK4IHUwT0m3h/u/WCk+kpRfxvAZhpC7Gc= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= | ||
github.com/google/docsy v0.5.1 h1:D/ZdFKiE29xM/gwPwQzmkyXhcbQGkReRS6aGrF7lnYk= | ||
github.com/google/docsy v0.5.1/go.mod h1:maoUAQU5H/d+FrZIB4xg1EVWAx7RyFMGSDJyWghm31E= | ||
github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI= | ||
github.com/google/docsy v0.6.0/go.mod h1:VKKLqD8PQ7AglJc98yBorATfW7GrNVsn0kGXVYF6G+M= | ||
github.com/google/docsy v0.7.0 h1:JaeZ0/KufX/BJ3SyATb/fmZa1DFI7o5d9KU+i6+lLJY= | ||
github.com/google/docsy v0.7.0/go.mod h1:5WhIFchr5BfH6agjcInhpLRz7U7map0bcmKSpcrg6BE= | ||
github.com/google/docsy/dependencies v0.5.1/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= | ||
github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= | ||
github.com/google/docsy/dependencies v0.7.0/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= | ||
github.com/twbs/bootstrap v4.6.2+incompatible h1:TDa+R51BTiy1wEHSYjmqDb8LxNl/zaEjAOpRE9Hwh/o= | ||
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= | ||
github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc= | ||
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= | ||
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= | ||
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg= | ||
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc= | ||
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ template "_default/_markup/td-render-heading.html" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.