Import practitioner guides from wg-data-science submodule #34
Open
Titas-Ghosh wants to merge 2 commits into
Open
Import practitioner guides from wg-data-science submodule #34Titas-Ghosh wants to merge 2 commits into
Titas-Ghosh wants to merge 2 commits into
Conversation
- Add wg-data-science as git submodule under external/ - Mount 11 practitioner guide markdown files + landing page via Hugo module mounts in hugo.toml - Mount images directory to static/practitioner-guides/images/ - Add cascade entries for titles and URLs of each guide - Add render-image hook to rewrite GitHub blob image URLs to local static paths - Add render-link hook to rewrite chaoss.community practitioner guide URLs to local relative paths - Mark old WordPress-exported copies as draft: true to prevent duplicate pages Closes chaoss#27 Signed-off-by: Titas-Ghosh <titas.ghosh7@gmail.com>
78e0bf7 to
f401d42
Compare
Contributor
|
If they're being successfully imported at the same URLs, we dont need to keep the copies that are in this repo (the draft ones) |
The imported guides from the wg-data-science submodule now serve the same URLs, so the old copies (with broken Visual Composer shortcodes) are no longer needed. Signed-off-by: Titas-Ghosh <titas.ghosh7@gmail.com>
Contributor
Author
|
Yeah that makes sense, removed all 12 old WordPress copies (11 guides + the landing page) the mounted versions serve the same URLs so they're no longer needed. 👍 |
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
Imports the 11 practitioner guides + landing page from the upstream
wg-data-science/practitioner-guides/directory into the Hugo site, replacing the old WordPress-exported copies that contain broken Visual Composer shortcodes.This follows the same submodule + module mount pattern established in #17 for CHAOSScon content.
Closes #27
What this PR does
Git submodule: Adds
external/wg-data-sciencepointing tohttps://github.com/chaoss/wg-data-science.gitHugo module mounts (
hugo.toml):website-landing.md) intocontent/images/directory (29 PNGs) tostatic/practitioner-guides/images/archetypes,content, andstatic(required by Hugo when adding any module mount)Cascade entries (
hugo.toml): Setstitleandurlfor each mounted guide page without modifying the upstream source filesRender hooks (new files in
themes/chaoss/layouts/_default/_markup/):render-image.html— Rewrites GitHub blob image URLs (e.g.,https://github.com/chaoss/wg-data-science/blob/main/practitioner-guides/images/foo.png) to local static paths (/practitioner-guides/images/foo.png)render-link.html— Rewriteshttps://chaoss.community/practitioner-guide-*links to local relative paths so inter-guide navigation stays within the Hugo site. Uses an explicit allowlist of the 12 known local paths.Old WordPress copies: Marked
draft: trueto prevent duplicate pages. These can be deleted in a follow-up cleanup PR.How it works
The upstream practitioner guide markdown files reference images using absolute GitHub blob URLs:
And link to other guides using
chaoss.communityURLs:Since we can't modify the upstream files, the render hooks transparently rewrite these at build time:
/practitioner-guides/images/static path/practitioner-guide-introduction/Testing
srcpathsdraft: trueScreenshots