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

Upgrade docsy to 0.11.0 and hugo to 0.139.0 #1996

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Nov 14, 2024

Here are the visual changes I noticed in the rendered spec:

Example, in the Transaction identifiers section:

Before:

image

After:

image

Another change I noticed in the generated HTML but that is not visible is that some uses of shortcodes generate empty paragraphs now (<p></p>). Since it doesn't change the rendering, I guess that browsers are smart enough to ignore them.

Pull Request Checklist

Preview: https://pr1996--matrix-spec-previews.netlify.app

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh requested a review from a team as a code owner November 14, 2024 13:49
@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 14, 2024

I found a change that breaks the spec on the proposals page:

image

The links seem to be escaped instead of rendered.

Edit: it seems like it was already broken in #1984.

@MTRNord
Copy link
Contributor

MTRNord commented Nov 14, 2024

About the empty p tags: that may or may not (I am only marginaly into those Tools) be annoying to screenreaders https://stackoverflow.com/a/68292918

I guess a quick check with the Linux or Apple tooling might clear that up?

Though I am not sure if the spec Page is screen Reader friendly anyway or if it is a goal :)

@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 14, 2024

I found a change that breaks the spec on the proposals page:

<image>

The links seem to be escaped instead of rendered.

I fixed it in #1997.

@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 15, 2024

I looked into the empty paragraphs and it doesn't seem like we are doing anything wrong. The only thing that seems to fix it is to use all the cs-module shortcodes on a single line, which feels wrong.

So I opened a discussion on Hugo's forum.

@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 17, 2024

The problem of empty paragraphs has been fixed upstream so they won't be generated with the next version of Hugo.

@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 18, 2024

I also updated the partials that are modified versions of Docsy's to match the latest version.

@Johennes
Copy link
Contributor

Could you also update the version reference in the README? It currently claims that 117 still works which is untrue even before this PR.

https://github.com/matrix-org/matrix-spec/blob/main/README.md?plain=1#L64

@zecakeh zecakeh changed the title Upgrade docsy to 0.11.0 and hugo to 0.138.0 Upgrade docsy to 0.11.0 and hugo to 0.139.0 Nov 19, 2024
@zecakeh
Copy link
Contributor Author

zecakeh commented Nov 19, 2024

Could you also update the version reference in the README? It currently claims that 117 still works which is untrue even before this PR.

https://github.com/matrix-org/matrix-spec/blob/main/README.md?plain=1#L64

This is done. It seems that the website now builds fine starting with hugo 0.123.1.

I also updated Hugo to the just released 0.139.0, which gets rid of the empty paragraphs.

name = "YouTube"
url = "https://www.youtube.com/channel/UCVFkW-chclhuyYRbmmfwt6w"
icon = "fab fa-youtube"
desc = "Matrix YouTube channel"
[[params.links.developer]]
[[params.links.bottom]]
name = "Twitter"
url = "https://twitter.com/matrixdotorg"
icon = "fab fa-twitter"
Copy link
Member

Choose a reason for hiding this comment

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

please can you explain why all this is changing? The commit comment says "Update footer partial" which doesn't give many clues

Copy link
Contributor Author

@zecakeh zecakeh Nov 19, 2024

Choose a reason for hiding this comment

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

There is a comment above the first param.links.bottom and other comments above that explain the locations of the different types of links.

Basically the footer partial of Docsy has been split into 3 partials, one for each column (left, right, center). By default in Docsy the "user" links are shown in the left column and the "developer" links are shown in the right column. Until now we changed the whole partial to show "developer" links in the center, instead of on the right. Now, to minimize the changes compared to the upstream partials, I created a new type of links, "bottom", so we can show them in the center by changing only the center partial.

Copy link
Member

@richvdh richvdh Nov 19, 2024

Choose a reason for hiding this comment

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

Ok, I get it now, thanks. It would have been nice if that explanation had made it into a commit comment or something, to help with review/future reference.

config.toml Outdated Show resolved Hide resolved
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@richvdh richvdh merged commit d5c56a4 into matrix-org:main Nov 19, 2024
12 checks passed
@zecakeh zecakeh deleted the docsy-0.11.0 branch November 19, 2024 22:16
@zecakeh zecakeh mentioned this pull request Nov 20, 2024
3 tasks
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.

4 participants