google / docsy-example

An example documentation site using the Docsy Hugo theme
https://docsy.dev
Apache License 2.0
470 stars 685 forks source link

Using local clone of docsy theme (via hugo workspace) #194

Closed deining closed 11 months ago

deining commented 1 year ago

This PR adds a hugo workspace file to the repo, pointing to the local git submodule clone of the docsy theme. This way, local edits to the theme can be immediately picked up when previewing the site. This facilitates hacking the docsy theme. A section Hacking docsy theme was added to README.md, describing the details of local edits while using a hugo workspace file.

deining commented 1 year ago

Reworked the PR, it now corresponds to HEAD of repo again. Additionally, I added support for local builds via npm, as proposed in #227.

chalin commented 11 months ago

Would the following NPM script work under Windows?

    "test": "echo ${HI:-Hello}",
deining commented 11 months ago

Would the following NPM script work under Windows?

    "test": "echo ${HI:-Hello}",

I don't have a Windows machine at hand right now. Will check tomorrow at work.

deining commented 11 months ago

See inline comments, thanks.

Thanks for your comments, all raised topics are resolved now.

deining commented 11 months ago

Would the following NPM script work under Windows?

    "test": "echo ${HI:-Hello}",

No, unfortunately not:

Windows

$ npm run test

> docsy-example-site@0.7.1 test2
> echo ${HI:-Hello}

${HI:-Hello}

Linux

$ npm run test

> docsy-example-site@0.7.1 test2
> echo ${HI:-Hello}

Hello
deining commented 11 months ago

Would the following NPM script work under Windows?

    "test": "echo ${HI:-Hello}",

Not fully clear what you are targeting at, but could the use of this package be a solution? I remember issue #973 which adresses a related problem.

chalin commented 11 months ago

Not fully clear what you are targeting at, but could the use of this package be a solution? I remember issue #973 which adresses a related problem.

I'm trying to avoid introducing dependencies for contributors. I don't have a solution that I'm 100% happy with yet (which is why I haven't addressed #973) -- I'm looking for a solution that I can adopt across all of my projects. Cross-env might be the answer.

Thanks for testing out the ${HI:-Hello} syntax and letting me know about shelljs.