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

Docsy upgrade #803

Merged
merged 8 commits into from
Mar 22, 2024
Merged

Docsy upgrade #803

merged 8 commits into from
Mar 22, 2024

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Mar 19, 2024

From SIG Docs mini-hackathon at Kubecon Paris 2024

@AndiDog
Copy link
Contributor Author

AndiDog commented Mar 19, 2024

An online bug report for the "Font-Awesome not found" error didn't result in a npm-compatible solution: https://discourse.gohugo.io/t/new-user-confused-by-the-current-state-of-the-theme-ecosystem/48747/4

@AndiDog
Copy link
Contributor Author

AndiDog commented Mar 19, 2024

We found the issue google/docsy#836 which gives a solution, but then the render hangs

$ hugo serve
hugo: downloading modules …

UPDATE: Scratch that, I was in a subdirectory...

@celestehorgan
Copy link

Collaborative work environment: tmux-paris-docs-sprint.celestehorgan.coder.cloudnative.coop

@hh
Copy link

hh commented Mar 19, 2024

◈ Starting Netlify Dev with Hugo                                                                             │·········
Start building sites …                                                                                       │·········
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z Ve│·········
ndorInfo=gohugoio                                                                                            │·········
WARN 2024/03/19 13:23:07 Config 'params.algolia_docsearch' is deprecated: use 'params.search.algolia'        │·········
      For details, see https://www.docsy.dev/docs/adding-content/search/#algolia-docsearch.                  │·········
ERROR 2024/03/19 13:23:16 render of "page" failed: "/home/ii/website/node_modules/docsy/layouts/blog/baseof.h│·········
tml:17:15": execute of template failed: template: blog/single.html:17:15: executing "blog/single.html" at <pa│·········
rtial "page-meta-links.html" .>: error calling partial: "/home/ii/website/node_modules/docsy/layouts/partials│·········
/page-meta-links.html:5:36": execute of template failed: template: partials/page-meta-links.html:5:36: execut│·········
ing "partials/page-meta-links.html" at <hugo>: can't evaluate field WorkingDir in type interface {}          │·········
ERROR 2024/03/19 13:23:16 render of "page" failed: "/home/ii/website/node_modules/docsy/layouts/blog/baseof.h│·········
tml:17:15": execute of template failed: template: blog/single.html:17:15: executing "blog/single.html" at <pa│·········
rtial "page-meta-links.html" .>: error calling partial: "/home/ii/website/node_modules/docsy/layouts/partials│·········
/page-meta-links.html:5:36": execute of template failed: template: partials/page-meta-links.html:5:36: execut│·········
ing "partials/page-meta-links.html" at <hugo>: can't evaluate field WorkingDir in type interface {}          │·········
ERROR 2024/03/19 13:23:16 render of "page" failed: "/home/ii/website/node_modules/docsy/layouts/blog/baseof.h│·········
tml:17:15": execute of template failed: template: blog/single.html:17:15: executing "blog/single.html" at <pa│·········
rtial "page-meta-links.html" .>: error calling partial: "/home/ii/website/node_modules/docsy/layouts/partials│·········
/page-meta-links.html:5:36": execute of template failed: template: partials/page-meta-links.html:5:36: execut│·········
ing "partials/page-meta-links.html" at <hugo>: can't evaluate field WorkingDir in type interface {}          │·········
ERROR 2024/03/19 13:23:16 render of "page" failed: "/home/ii/website/node_modules/docsy/layouts/blog/baseof.h│·········
tml:17:15": execute of template failed: template: blog/single.html:17:15: executing "blog/single.html" at <pa│·········
rtial "page-meta-links.html" .>: error calling partial: "/home/ii/website/node_modules/docsy/layouts/partials│·········
/page-meta-links.html:5:36": execute of template failed: template: partials/page-meta-links.html:5:36: execut│·········
ing "partials/page-meta-links.html" at <hugo>: can't evaluate field WorkingDir in type interface {}          │·········
Built in 9687 ms                                                                                             │·········
Error: Error building site: failed to render pages: render of "page" failed: "/home/ii/website/node_modules/d│·········
ocsy/layouts/blog/baseof.html:17:15": execute of template failed: template: blog/single.html:17:15: executing│·········
 "blog/single.html" at <partial "page-meta-links.html" .>: error calling partial: "/home/ii/website/node_modu│·········
les/docsy/layouts/partials/page-meta-links.html:5:36": execute of template failed: template: partials/page-me│·········
ta-links.html:5:36: executing "partials/page-meta-links.html" at <hugo>: can't evaluate field WorkingDir in t│·········
ype interface {}                                                                                             │·········
⠇ Waiting for framework port 1313. This can be configured using the 'targetPort' property in the netlify.toml│·········
◈ Command failed with exit code 255: hugo serve --minify -DFE -w. Shutting down Netlify Dev server           │·········

@AndiDog
Copy link
Contributor Author

AndiDog commented Mar 19, 2024

npm run serve works for me now, let's see what the build says

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
…-cli; add themes directory setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
@hh
Copy link

hh commented Mar 19, 2024

Emacs and Vim living together on the same page!

image

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
@AndiDog AndiDog marked this pull request as ready for review March 19, 2024 14:52
@AndiDog AndiDog changed the title Docsy upgrade WIP Docsy upgrade Mar 19, 2024
@sftim
Copy link

sftim commented Mar 21, 2024

Looks kinda OK-ish to me (lkotm?)

The scroll behavior left pane for site navigation looks slightly weird (I tried in Firefox), but I think that's OK to fix post merge. Also the foot of the site is now missing 4 links:

Terms | Privacy | Trademarks | License

To summarize: I'd fix the footer but don't think it's important to worry about the scroll behavior.

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
@AndiDog
Copy link
Contributor Author

AndiDog commented Mar 21, 2024

I added the links back as follows by using the regular override mechanism with what docsy's footer partial offers:

Screenshot 2024-03-21 at 21 59 13

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deploy preview is looking great - I can't spot any issues.

Fantastic work team!

Edit: Gentle ping @ahrtr for additional review - This resolves a long standing dependency issue for our site by moving from a very old fork of docsy which was a git submodule to now bringing in a modern docsy version via npm.

@jmhbnz jmhbnz requested a review from ahrtr March 22, 2024 07:42
@jberkus
Copy link
Contributor

jberkus commented Mar 22, 2024

Looks good.

/approve
/lgtm

Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks so much @AndiDog, and everyone that came out to hack on this over the last week!

fixes: #748, #718, #717

/approve

@nate-double-u nate-double-u merged commit 72387f9 into etcd-io:main Mar 22, 2024
5 checks passed
dwelsch-esi pushed a commit to dwelsch-esi/website-1 that referenced this pull request Mar 26, 2024
* git rm -r themes/docsy

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* npm install --save-dev google/docsy#semver:0.9.1 autoprefixer postcss-cli; add themes directory setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new docsy versions configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new theme configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Fix deprecated Hugo setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Upgrade hugo-extended to fix build error about `WorkingDir` property

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Ignore empty hash because docsy uses `href="#"`

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Add back etcd-specific footer override

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

---------

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Signed-off-by: Dave Welsch <116022979+dwelsch-esi@users.noreply.github.com>
ivanvc pushed a commit to ivanvc/etcd-website that referenced this pull request May 13, 2024
* git rm -r themes/docsy

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* npm install --save-dev google/docsy#semver:0.9.1 autoprefixer postcss-cli; add themes directory setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new docsy versions configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new theme configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Fix deprecated Hugo setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Upgrade hugo-extended to fix build error about `WorkingDir` property

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Ignore empty hash because docsy uses `href="#"`

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Add back etcd-specific footer override

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

---------

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
wenjiaswe pushed a commit that referenced this pull request Jun 13, 2024
* git rm -r themes/docsy

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* npm install --save-dev google/docsy#semver:0.9.1 autoprefixer postcss-cli; add themes directory setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new docsy versions configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Move to new theme configuration

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Fix deprecated Hugo setting

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Upgrade hugo-extended to fix build error about `WorkingDir` property

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Ignore empty hash because docsy uses `href="#"`

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

* Add back etcd-specific footer override

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>

---------

Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants