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

website: upgrade hugo #3787

Closed
srenatus opened this issue Sep 14, 2021 · 0 comments · Fixed by #3986
Closed

website: upgrade hugo #3787

srenatus opened this issue Sep 14, 2021 · 0 comments · Fixed by #3986

Comments

@srenatus
Copy link
Contributor

We're stuck in the past on a certain hugo version (0.55.5. It's unclear how easy it is to update the version, but it probably requires fixing a few templates.

At least one issue that'll be resolved by upgrading is code blocks in lists. As of now,

1. foo

   ```
   some code
   ```

2. bar

will not render correctly. The markdown renderer was replaced in a later version of hugo.

(The old version probably has implications on being able to use current hugo plugins? But I'm not sure. Came to mind wrt #3664.)

srenatus added a commit that referenced this issue Nov 9, 2021
* website: bump hugo, updated templates

For some reason, the "and" trick to step around undefined values no longer
worked. So now, we're wrapping {{ if }} conditionals instead: the outer one
checks that the value is defined, the inner one asserts something on its
value.

* live-blocks/preprocess: add wrapper div, remove newline

Somewhere between 0.55 and the most recent version, Hugo stopped emitting
that div on purpose for languages it didn't know.

Since we depend on it for further processing, we're adding it back.

Also, a trailing newline for code elements was introduced, and that broke
our codemirrors integration -- every code entry would be folllowed by an
empty line. Now, we're removing that in the same preprocess step.

* website: fix info|danger blocks
* website/config: trust markdown to include html

Fixes #3787.

Signed-off-by: Stephan Renatus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant