-
Notifications
You must be signed in to change notification settings - Fork 894
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But our CI / Netlify build actions use hugo --themesDir ../..
and the build process is running fine. E.g., this is the latest production build, https://app.netlify.com/sites/docsydocs/deploys/655157197e81260008cee338:
...
5:52:39 PM: > build:production
5:52:39 PM: > npm run _hugo -- --minify
5:52:40 PM: > _hugo
5:52:40 PM: > hugo --cleanDestinationDir --themesDir ../.. --minify
5:52:40 PM: Start building sites …
5:52:40 PM: hugo v0.120.4-f11bca5fec2ebb3a02727fb2a5cfb08da96fd9df+extended linux/amd64 BuildDate=2023-11-08T11:18:07Z VendorInfo=gohugoio
5:52:42 PM: | EN
5:52:42 PM: -------------------+-----
5:52:42 PM: Pages | 81
5:52:42 PM: Paginator pages | 0
5:52:42 PM: Non-page files | 8
5:52:42 PM: Static files | 35
5:52:42 PM: Processed images | 5
5:52:42 PM: Aliases | 3
5:52:42 PM: Sitemaps | 1
5:52:42 PM: Cleaned | 0
5:52:42 PM: Total in 1767 ms
5:52:42 PM: > postbuild:production
5:52:42 PM: > npm run _check:links
...
The build works locally as well for me. Is there something I'm missing?
Yes, but only if you are using npm for the build. Then two directories will be created prior to build process via this directive: Line 10 in 8e9cb3c
How to repoduce the error I'm referring to: Run
|
59a1d53
to
dd3216d
Compare
6d6f8ef
to
b70be1a
Compare
b70be1a
to
36edf10
Compare
After some tweaking, the user guide can be now build successfully via:
|
8d6cf4d
to
31aeeb3
Compare
Just realized that with this PR in place, we can simplify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for exploring this, but this PR breaks the builds of projects that don't use Docsy as a Hugo module because of the removal of the _mkdir:hugo-mod
script.
As for switching to Hugo modules for the User Guide, the PSC decided against that in February of this year, back when Docsy support for Hugo modules was introduced. For some context, see the thread starting at @LisaFC's comment #871 (comment).
Part of the reasoning was that the Docsy example would use Hugo modules and the UG would not. With such a setup we have CI of two repos each testing out alternative Docsy usage scenarios.
I can bring up the issue again at the next PSC meeting if you'd like, but the reasons for doing it the way it is now still hold.
The PSC during today's meeting upheld the preference to not have the User Guide as a module. /cc @LisaFC @emckean @geriom. Closing. |
After having #1217 merged, the user guide cannot built successfully using
hugo --themesDir ../..
any more. This PR fixes this by pulling in docsy as a hugo module when building or previewing the user guide. In the module definition insideuserguide/hugo.yaml
, there is a workspace definition in place so that docsy is pulled in from the local docsy sources in the repo root level). Previewing the user guide is now as easy as: