docsy icon indicating copy to clipboard operation
docsy copied to clipboard

Offer Docsy as a single Hugo Module

Open deining opened this issue 3 years ago • 1 comments

This PR merges the module docsy and docsy/dependencies into one single module in order to streamline use of Docsy for Hugo Module users. This is a first take at #1120, once finished, this PR will close #1120.

deining avatar Sep 02 '22 09:09 deining

Netlify preview fails, but this was expected.

deining avatar Sep 02 '22 09:09 deining

@deining - thanks for this. I'm willing to give this a spin. Could you please resolve conflicts (though maybe it is best to wait for #1218 to be merged first).

FYI, v0.5.0 will be released soon. This PR is targeted for a subsequent release (probably v0.6.0).

chalin avatar Oct 07 '22 20:10 chalin

Could you please resolve conflicts.

Done.

FYI, v0.5.0 will be released soon. This PR is targeted for a subsequent release (probably v0.6.0).

Great. I can contribute to the documentation and will assist in case of any questions/issues.

deining avatar Oct 10 '22 18:10 deining

Netlify preview (git submodule approach) is fine now, so this PR is ready for review and subsequent merging now. @chalin: awaiting the results of your review!

deining avatar Oct 26 '22 19:10 deining

Thanks! Will get to this as soon as I can.

chalin avatar Oct 28 '22 15:10 chalin

@deining - Shouldn't github.com/google/docsy/dependencies entries be removed from go.mod and go.sum?

Yes, very true.

Also running hugo mod tidy would be a good idea as well, no?

Done with commit 396d76d.

deining avatar Nov 09 '23 13:11 deining

Thanks for the updates.

Have you tested this locally, and if so how? I can't get it to work, whether with using a (slightly modified) version of docsy-example or starting from scratch, again following a modified version of the instructions https://www.docsy.dev/docs/get-started/docsy-as-module/start-from-scratch/.

chalin avatar Nov 09 '23 13:11 chalin

Thanks for the updates.

You are welcome.

Have you tested this locally,

Yes.

and if so how?

I started a new site from scratch, created a clone of docsy beside the newly created site repo and used hugo.work to refer to the local docsy theme repo. Similar do what I proposed in another PR from me. Everything ran smoothly, the site was up and running in no time 😄 .

I can't get it to work

I prepared a branch for you on my fork of the docsy-example repo. Please try this:

git clone -b docsy-as-single-module https://github.com/deining/docsy-example docsy-as-single-module-test
hugo server

This works for me out of the box. Can you please give this a try?

deining avatar Nov 09 '23 16:11 deining

This works for me out of the box. Can you please give this a try?

Yes, it works, thanks!

I also got it to work with a docsy.work file.

chalin avatar Nov 09 '23 18:11 chalin

This works for me out of the box. Can you please give this a try?

Yes, it works, thanks!

I also got it to work with a docsy.work file.

Great to hear that!

Do you deem this PR production ready and ready for subsequent merging? What is still missing and what are the next steps?

deining avatar Nov 10 '23 08:11 deining

Do you deem this PR production ready and ready for subsequent merging? What is still missing and what are the next steps?

Almost there! I'd like to address https://github.com/google/docsy/pull/1217#discussion_r1389230896 first.

chalin avatar Nov 10 '23 10:11 chalin

In case you missed my nested comment @deining:

How can I check what's in hugo module cache?

chalin avatar Nov 10 '23 14:11 chalin

In case you missed my nested comment @deining:

No I didn't miss it!

How can I check what's in hugo module cache?

Find out your cache dir (on my Unix system, this is /home/username/.cache/hugo_cache):

hugo config | grep cachedir

Have a look there, directories you should possibly look at:

~/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/deining/[email protected]/

and maybe also

~/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/[email protected]+incompatible/
~/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!fort!awesome/[email protected]

deining avatar Nov 10 '23 15:11 deining