-
Notifications
You must be signed in to change notification settings - Fork 901
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
Enable to pull in docsy as hugo module #871
Conversation
fca38b2
to
a88402d
Compare
Will also need to review and potentially reorganize #802 when we're happy to add this to the main public docs. |
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 your efforts!
See inline comments and questions.
Thanks again for all your efforts @deining. I have a few questions -- see below.
That's it for now. Thanks for entertaining my questions. |
You are welcome.
Yes.
I agree that
Yes, I asked on the hugo discourse list, but I that didn't help me much. I agree that it's a bit akward to separate out dependencies into a separate module. But I really think is quite clean and I like it much more than the
Yes, that's correct. Then we can merge both modules into one and we are set.
As long as we don't change the directory structure inside
Frankly spoken, I was a bit surprised to see that NPM packages will be implemented to replace git submodules. As pointed out by you, we then have several competing approaches and keeping them in sync may be a challenge indeed. I'm not against
or
No (extra) npm installation needed in this case. That's my vision, and time permitting, I will push this forward. |
Thanks for answering my questions @deining. I'm looking forward to the updates to this PR, after which I believe that it'll be good to go. As for dropping git submodules for BS & FA in favor of NPM packages, see my comments in #870 (comment). |
Changed to |
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 the updates @deining, we're almost there! See inline questions and comments.
As I mentioned earlier, I'd rather that there be no changes to the userguide
directory. In particular, why is there a go.mod
file specifying that the userguide is a part of the github.com/google/docsy
module? (As for the comment in the config file, I can understand why we might want to keep it there.)
e444964
to
96604cb
Compare
I thought about this and come up with a different solution that I would like to propose: Why don't we turn the userguide into a hugo module the go-less way? I implemented this in a new branch
No
If we stick to this proposed module route, I think it's natural to mark the userguide itself as module. Apart from that, if we go this route, I would prefer to use the modern |
I think for now I'd prefer to leave the userguide as-is - its current setup works, it works with our continuous deployment/previews from Netlify, and I think the likelihood of anyone wanting to just pull down the user guide to edit/serve minus the rest of the theme is pretty small (generally community members who edit the docs do so along with a theme update). What are the advantages of making it into a module, other than "it is the newest Hugo way"? We can then look at refactoring it as a module itself once we've sorted the general "use Docsy as a Hugo module". |
I deployed the user guide on Netlify the hugo module way, and that worked out of the box, too.
That may be true for the moment, but we should also seek perspectives for the future. One thing that I have in mind: Novice users could easily take the directory My hope: once novice users see how easy it is to invoke the user guide via the module way, they are more inclined to go this path for their own new installation. I think we can accelerate the transition to the use of docsy as hugo module this way, and that's a good thing IMHO.
You are invited to check these perfomance figures noted above by yourself: Traditional:
Hugo module
|
This is my preference as well: let's get Docsy-as-a-hugo-module in first. |
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.
@deining: the PSC was in agreement that we'd like to bring in the docsy-as-hugo-module feature without any changes to the userguide -- please file a separate issue for the config file refactoring. Can you make the remaining changes that were requested for this PR?
534eb21
to
9d4aed8
Compare
Just commited the requested changes into branch |
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.
LGTM after you rebase (I've tried to rebase but I can't force push). Thanks @deining!
9d4aed8
to
dcf58ac
Compare
Rebased the branch as requested. |
Fantastic - I have some time this week and will revise the docs!! |
This is my final PR that enables users to pull in docsy as hugo module.
Having learned from the experiences that early adopters of docsy as hugo module made, I came up with the following solution:
We do have two modules now:
github.com/google/docsy
this is the themegithub.com/google/docsy/module
, this is needed only if you use docsy as hugo modules, it pulls in dependenciesbootstrap
andFont-Awesome
.With all dependendies in place, one can now switch back and forth between traditional git submodules
and modern docsy hugo module, pulled in from github:
Both modules were tagged as
v0.2.0-pre
andmodule/v0.2.0-pre
resprectively, we should remove-pre
once we merged this PR.The corresponding documentation can be found in #802, it was updated and now reflect this latest state of module code as submitted with this PR.
This PR hopefully brings the module venture to a good end.