Navigation Menu

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

Fix guides titles (<title>) #524

Merged
merged 2 commits into from Sep 14, 2020
Merged

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Sep 10, 2020

The title was using what amounted to:

echo '[% $title %]' > file.tt

Which put the literal $title perl variable, which in Template Toolkit,
an undefined variable is equivalent to an empty string.

This made the <title /> of the page be "NixOS - Guides - ".

This fixes that by using the better printf building for building
strings to print.

Additionally we can drop the empty echoes and use \n as printf honours
them.


In addition, mark the script as an input of those generated files.

The title was using what amounted to:

   echo '[% $title %]' > file.tt

Which put the literal `$title` perl variable, which in Template Toolkit,
an undefined variable is equivalent to an empty string.

This made the <title /> of the page be "NixOS - Guides - ".

This fixes that by using the better `printf` building for building
strings to print.

Additionally we can drop the empty echoes and use `\n` as printf honours
them.
@garbas garbas merged commit 5d19825 into NixOS:master Sep 14, 2020
@samueldr samueldr deleted the fix/guides-titles branch September 14, 2020 18:46
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

2 participants