Add aliases to all posts for old Hugo/Jekyll URL redirects
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 72/100
Research direction
Start by inspecting the frontmatter in posts/2013//index.md, posts/2019//index.qmd, and posts/2020/*/index.qmd, then apply the three alias cases to the remaining posts under posts/. Skip the 2026 cherry blossoms post, preserve existing aliases, and run quarto render; done means redirect HTML files appear under _site/YYYY/MM/DD/slug/index.html for the old URLs.
Written by the indexing model from the issue text.
Description
Background
The site has gone through several CMS migrations:
- Jekyll (2013–2014): URL pattern
/YYYY/MM/DD/slug/ - Hugo/blogdown (2015–2020): same URL pattern
/YYYY/MM/DD/slug/ - Quarto (current): URL pattern
/posts/YYYY/YYYY-MM-DD-slug/
External sites link to the old URL format. For example, a Posit blog post links to:
https://chendaniely.github.io/2019/08/28/r-or-python-which-one-to-learn-first/
The current URL for that post is:
https://chendaniely.github.io/posts/2019/2019-08-28-r-or-python-which-one-to-learn-first/
Solution
Quarto supports an aliases: field in post frontmatter that generates HTML redirect pages at the listed paths. Add the old-style URL as an alias to every post.
Example — add to posts/2019/2019-08-28-r-or-python-which-one-to-learn-first/index.qmd:
aliases:
- /2019/08/28/r-or-python-which-one-to-learn-first/
Implementation
All 62 posts (2013–2020 + 2026) live under posts/ as index.md or index.qmd.
The old alias URL is always /YYYY/MM/DD/slug/ and can be derived in one of three ways depending on what frontmatter the post has:
Case 1 — Has permalink: (2 posts, both in 2013)
Use the permalink: value directly as the alias.
# existing
permalink: /2013/02/21/setting-up-virtualbox/
# add
aliases:
- /2013/02/21/setting-up-virtualbox/
Files: posts/2013/*/index.md
Case 2 — Has slug: + date: (11 posts, 2019–2020 Rmd→qmd conversions)
Derive the alias from date: 'YYYY-MM-DD' + slug: some-slug-value:
→ alias = /YYYY/MM/DD/some-slug-value/
Some slugs are empty (slug: []) — for those, derive the slug from the folder name
(strip the YYYY-MM-DD- prefix from the folder name).
Files: posts/2019/*/index.qmd, posts/2020/*/index.qmd
Case 3 — Has neither permalink: nor slug: (48 posts, 2014–2018)
Derive alias entirely from the folder name.
Folder: posts/YYYY/YYYY-MM-DD-some-slug/
→ Parse date as YYYY/MM/DD, slug as everything after YYYY-MM-DD-
→ alias = /YYYY/MM/DD/some-slug/
Script approach
A Python or R script can handle all three cases:
- Walk every
posts/YYYY/*/index.*file - Parse the YAML frontmatter
- Determine the alias URL via the case logic above
- Inject
aliases: [/YYYY/MM/DD/slug/]into the frontmatter if not already present - Write back the file
The PyYAML or yaml R package can parse/write the frontmatter.
Alternatively a sed/awk script can do it since the frontmatter is always at the top between --- delimiters.
Notes
- The 2026 cherry blossoms post (
posts/2026/) has no old URL — skip it - Some 2016–2018 posts use underscores in folder names (e.g.
2016-08-31-a_simple_model_of_global_cascades_on_random_networks) — the old Hugo URL used the same underscore slug, so the derived alias should match - After adding aliases, run
quarto renderto confirm the redirect HTML files are generated under_site/YYYY/MM/DD/slug/index.html
- Dominant language
- SCSS
- Stars
- 6
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from chendaniely/chendaniely.github.io
-
Difficulty 3/5 3-5 days Newbie friendliness 68/100
-
redirect file Open
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
orcid Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
chendaniely/chendaniely.github.io#23 · 1 comment ·
All issues in chendaniely/chendaniely.github.io
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bvaughn/react-resizable-panels#751 · 1 comment ·
-
www.wiwo.de OpenN: AdGuard Browser Extension P3: Medium T: Annoyance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AdguardTeam/AdguardFilters#242026 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100