Move ported posts under content/blog/ported/#263
Merged
Conversation
✅ Deploy Preview for posit-open-source canceled.
|
Publishing checklist
|
c49a2ac to
4f1c5b1
Compare
Replaces 476 internal links of the form /blog/<source>/<post>/ with their permalink form /blog/YYYY-MM-DD_<slug>/ across 231 files. Decouples links from folder structure so a future reorganization (e.g. moving ported posts to a subdirectory) doesn't break them. Source files (.qmd, .Rmd, .Rmarkdown) and their rendered .md/.markdown outputs get the same rewrite so re-rendering won't undo it. Both pre- and post-rewrite Hugo builds produce identical broken-link output (0 broken across 29,619 internal links / 1,012 HTML files).
A "0 broken" result was masking a silent Hugo build failure that produced no HTML at all. The script now reports how many internal links it actually checked across how many files, and exits non-zero with a stderr warning when 0 files are scanned — so a broken build can't masquerade as a clean check.
Relocates all ported source dirs (ai, education, great-tables, plotnine, pointblank, positron, quarto, rstudio, shiny, tidyverse) from content/blog/<source>/ to content/blog/ported/<source>/. URLs are unaffected — the blog permalink template uses date + slug/basename, not the section path. Also includes a few link cleanups exposed by the move: - Rewrites reference-style markdown links ([label]: URL form) and absolutizes `../`-style relative paths in rendered files where they cross out of the source's own section. These slipped through the previous content-path rewrite. - Replaces broken refs to /blog/ai/2023-04-05-deep-learning-scientific- computing-r-torch/ (a post that was never created) with the book's actual external page. Hugo's GetPage was silently masking these pre-move; the move exposes them. - Updates two slug references that hardcoded source paths (content/featured/blog.md, content/test-cards/_index.md). Verification: post-move build is clean, with 0 broken / 29,672 internal links across 1,014 HTML files, matching the pre-move baseline.
Source had [quarto.org](/) (correct on quarto.org, where the post originally lived). After porting, this resolved to the opensource.posit.co homepage rather than quarto.org. Use the explicit external URL so it works in both contexts.
Refresh references in the authoring guide, porting notes, editing-ported notes, the blog CLAUDE.md JSON example, and the /new-post skill so they reflect the new content/blog/ported/<source>/ layout. Also tightens the link guidance in _porting-notes.md and _editing-ported-posts.md to recommend permalink-form URLs (/blog/YYYY-MM-DD_slug/) rather than content-path-style URLs that depend on folder structure.
eb7a300 to
2257ef7
Compare
PR #258 added images/outgrowing.jpg under content/blog/positron/... just before the move commit was rebased; git's rename detection didn't extend the parent-dir rename to the newly added file, so it landed outside the ported/ tree. Move it into place so the post's image reference resolves.
Blog YAML Checks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Relocates all ported source dirs (
ai,education,great-tables,plotnine,pointblank,positron,quarto,rstudio,shiny,tidyverse) fromcontent/blog/<source>/tocontent/blog/ported/<source>/. Top-levelcontent/blog/is now reserved for new posts.URLs are unaffected — the blog permalink template uses
date+slug/basename, not the section path. Hugo'sSectionfor a deeply-nested page is stillblog, so taxonomies and listings work unchanged.Three commits
/blog/<source>/<post>/to/blog/YYYY-MM-DD_<slug>/across 231 files. Source.Rmd/.qmd/.Rmarkdownand their rendered.md/.markdownget the same rewrite so re-rendering won't undo it.check-blog-links.py— a "0 broken" result was previously masking a silent Hugo build failure (no Tailwind → no HTML). Script now prints "Checked N internal links across M files" and exits non-zero with a warning when 0 files are scanned.content/blog/ported/— pure renames plus a few link cleanups exposed by the move: reference-style markdown links ([label]: URL),../-style relative paths that crossed out of the source's section, and replacement of three pre-existing dead refs (a post that was never ported) with the book's real external URL. Also updates two slug references that hardcoded source paths (content/featured/blog.md,content/test-cards/_index.md).Test plan
Automated
0 broken / 31,639 internal links across 1,017 HTML files.Manual — verify
quarto renderinteractionThe
render-link.htmlhook resolves Quarto's relative path output. On re-render, Quarto rewrites our absolute/blog/<permalink>/links to../../../../blog/<permalink>/; the hook'spath.Joincollapses those back to absolute. The committed.mdalready has the absolute form so no re-render is needed for the preview to look right, but please spot-check these in the deploy preview to confirm the rendered HTML has working cross-blog links:.qmd-sourced posts with absolute permalink cross-links:.qmd-sourced posts with../-style relative cross-blog links (the case we worried about):../../../blog/2026-04-06_positron-server-jupyterhub/, now absolutized../../../resources/videos/...links to conf 2025 videos, now absolutizedProject blog listing pages still populate from the
sourcefrontmatter field (not folder path):