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 spacing issues in sidebar titles #1005

Closed
genehack opened this issue Aug 28, 2024 · 1 comment · Fixed by #1014
Closed

Fix spacing issues in sidebar titles #1005

genehack opened this issue Aug 28, 2024 · 1 comment · Fixed by #1014
Assignees

Comments

@genehack
Copy link
Contributor

Why are our sidebar short titles so bad?

image

I guess they're generated from the filename instead of pulled from the frontmatter, and so have that "computer touch" instead of that "human touch"?

Originally posted by @tsibley in #1004 (comment)

@genehack
Copy link
Contributor Author

I'm going to suggest that (especially given the small number of blog posts, currently) that we update the blog software to look for a sidebar_title key in the YAML Front Matter, and use that as the sidebar/archive list title string, rather than whatever title-casing/rewriting of the file name is currently happening.

Unless I hear pushback around that, I will work on this change in our next 2 week cycle.

@genehack genehack self-assigned this Aug 28, 2024
genehack added a commit that referenced this issue Sep 4, 2024
…ontmatter [#1005]

* Removes previous calculated `sidebarName` post object key in favor
  of optional `sidebarTitle` in post frontmatter
* If frontmatter does not contain `sidebarTitle`, `post.sidebarTitle`
  is set tot the frontmatter `title` value
* Update blog JSX files to use `post.sidebarTitle` instead of
  `post.sidebarName`
* Delete now unused `formatFileName()` method
genehack added a commit that referenced this issue Sep 4, 2024
Generally speaking, these sidebar titles were written to maintain the
current sidebar titles (which were formally based on file names) as
much like the existing ones as possible, while also correcting spacing
and other issues (i.e., `SARS CoV 2` is now properly `SARS-CoV-2`; `H
5 N 1` is now `H5N!`, etc.)
genehack added a commit that referenced this issue Sep 4, 2024
genehack added a commit that referenced this issue Sep 4, 2024
…ontmatter [#1005]

* Removes previous calculated `sidebarName` post object key in favor
  of optional `sidebarTitle` in post frontmatter
* If frontmatter does not contain `sidebarTitle`, `post.sidebarTitle`
  is set tot the frontmatter `title` value
* Update blog JSX files to use `post.sidebarTitle` instead of
  `post.sidebarName`
* Delete now unused `formatFileName()` method
genehack added a commit that referenced this issue Sep 4, 2024
Generally speaking, these sidebar titles were written to maintain the
current sidebar titles (which were formally based on file names) as
much like the existing ones as possible, while also correcting spacing
and other issues (i.e., `SARS CoV 2` is now properly `SARS-CoV-2`; `H
5 N 1` is now `H5N!`, etc.)
genehack added a commit that referenced this issue Sep 4, 2024
genehack added a commit that referenced this issue Sep 5, 2024
Add support for `sidebarTitle` value in blog post frontmatter; fix existing blog sidebar titles [#1005]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant