Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User guide: use docsy as module (in workspace) #1731

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"scripts": {
"_cd:docs": "cd userguide &&",
"_check:format": "npx prettier --check .??* *.md",
"_mkdir:hugo-mod": "npx mkdirp ../github.com/FortAwesome/Font-Awesome ../github.com/twbs/bootstrap",
"_cp:bs-rfs": "cp -R node_modules/bootstrap/scss/vendor/* assets/_vendor/bootstrap/scss/",
"build:preview": "npm run cd:docs build:preview",
"build:production": "npm run cd:docs build:production",
Expand All @@ -21,7 +20,7 @@
"fix:format": "npm run _check:format -- --write",
"get:hugo-modules": "node tools/getHugoModules/index.mjs",
"get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}",
"postinstall": "npm run _mkdir:hugo-mod && npm run _cp:bs-rfs",
"postinstall": "npm run _cp:bs-rfs",
"serve": "npm run cd:docs serve",
"test": "npm run cd:docs test",
"update:pkg:hugo": "npm install --save-exact -D hugo-extended@latest",
Expand All @@ -35,7 +34,6 @@
"devDependencies": {
"hugo-extended": "0.120.4",
"markdown-link-check": "^3.11.2",
"mkdirp": "^3.0.1",
"prettier": "^3.0.3"
},
"engines": {
Expand Down
3 changes: 1 addition & 2 deletions userguide/content/en/docs/contribution-guidelines/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ If you want to run your own local Hugo server to preview your changes as you wor
```

1. Change to the `userguide` directory and run the following Hugo command to build the site and start the Hugo server.
Note that you need the `themesDir` flag because the site files are inside the theme repo.

```sh
cd userguide
hugo server --themesDir ../..
hugo server
```

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.
Expand Down
4 changes: 4 additions & 0 deletions userguide/docsy.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
go 1.19

use . // folder userguide
use .. // folder docsy (theme sources)
1 change: 1 addition & 0 deletions userguide/docsy.work.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
5 changes: 5 additions & 0 deletions userguide/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/google/docsy/userguide

go 1.12

require github.com/google/docsy v0.7.2 // indirect
7 changes: 7 additions & 0 deletions userguide/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.7.2 h1:KzhFgTd3taF1jq9HDemH3omlUqn9qfdE68sxRyTySpM=
github.com/google/docsy v0.7.2/go.mod h1:ol3w2s1FBUzENdKSAEeNjtuaISUzHYHTw60xv5QH3Dg=
github.com/google/docsy v0.7.3-0.20231111150834-c36c727b8beb h1:iqazo50LwAWKpKiAao0VzqoM3qVmlNJVSBIW6POE/is=
github.com/google/docsy v0.7.3-0.20231111150834-c36c727b8beb/go.mod h1:AA0RAVm0Tr5nEC4PX68MoE7RjC8mTcvw4zIrelP1BnA=
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
6 changes: 5 additions & 1 deletion userguide/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ baseURL: /
title: &title Docsy
description: &desc Docsy does docs
enableRobotsTXT: true
theme: [docsy]
enableGitInfo: true

pygmentsCodeFences: true
Expand Down Expand Up @@ -127,6 +126,11 @@ taxonomies:
category: categories

module:
# Comment the next line to build for latest officially released version:
workspace: docsy.work
imports:
- path: github.com/google/docsy
disable: false
mounts:
- source: content/en
target: content