Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ public/
resources/
node_modules/
tech-doc-hugo
.hugo_build.lock
*.sw?
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,48 @@ The `toc_root` setting causes the `blog` section to be removed from the main sec

Otherwise it all works just like any other Docsy site.

To use this for yourself, make a copy of this template project and change `content/en` as needed (don't forget to run `git submodule update --init --recursive` to fetch the theme and its dependencies).
## Using MostlyDocs as template

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**.

2. Select a name for your new project and click **Create repository from 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:

```bash
git clone --depth 1 https://github.com/me/example.git
```

You can now edit your own versions of the site’s source files at `content/en` as needed.

If you want to do SCSS edits and want to publish these, you need to install `PostCSS`

```bash
npm install
```

## Running the website locally

Building and running the site locally requires a recent `extended` version of [Hugo](https://gohugo.io).
You can find out more about how to install Hugo for your environment in our
[Getting started](https://www.docsy.dev/docs/getting-started/#prerequisites-and-installation) guide.

Once you've made your working copy of the site repo, from the repo root folder, run:

```
hugo server
```

By default, docsy theme is pulled in as hugo module. To use docsy as git submodule, follow these steps:

- uncomment the line `theme = ["docsy"]` in your `config.toml`
- run `git submodule update --init --recursive` to fetch the theme
- enter themes/docsy and run npm to install dependencies

## Taxonomy Support

Taxonomies such as tags and categories work in the same way as they do with Docsy. They are disabled by default.
Taxonomies such as tags and categories work in the same way as they do with Docsy. They are disabled by default.

See the [Docsy taxonomy support](https://www.docsy.dev/docs/adding-content/taxonomy/) documentation for instructions.
7 changes: 4 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ title = "Mostly Docs"
enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]
# theme = ["docsy"] # tradional, docsy as git submodule
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]

# Will give values to .Lastmod etc.
enableGitInfo = true
Expand Down Expand Up @@ -68,8 +69,8 @@ weight = 1

# Comment out this section to disable the "Print entire section" feature
# See https://www.docsy.dev/docs/adding-content/print/
[outputs]
section = [ "HTML", "RSS", "print" ]
#[outputs]
#section = [ "HTML", "RSS", "print" ]

# Everything below this are Site Params

Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/gwatts/mostlydocs

go 1.20

require github.com/google/docsy v0.6.0 // indirect
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
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/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE=
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
5 changes: 3 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# Default build settings
[build]
publish = "public"
command = "git submodule update -f --init --recursive && npm install && hugo"
command = "hugo"

# "production" environment specific build settings
[build.environment]
HUGO_VERSION = "0.89.4"
HUGO_VERSION = "0.110.0"
GO_VERSION = "1.20"
HUGO_ENV = "production"
Loading