Repository navigation
feat: modernize pull behavior page with Graphviz SSR pipeline - #93
Merged
Merged
Conversation
This commit introduces the Server-Side Rendering (SSR) pipeline for Graphviz diagrams, a technique recently pioneered on the git-scm.com and gitgitgadget.github.io sibling sites. This provides a fast, static experience without shipping a heavy WebAssembly payload to visitors. The architecture relies on several coordinated changes. The layouts/_default/_markup/render-codeblock-graphviz.html hook intercepts Graphviz blocks, converting them to placeholders and tagging the page. To identify these pages during the build, hugo.yml is configured to allow JSON output, and the combination of content/diagram-list.html with layouts/_default/single.json.json generates a targeted list. The core rendering logic resides in script/graphviz-ssr.js, which requires the node-html-parser dependency tracked in package.json. This script reads the JSON list, processes the HTML files, and replaces placeholders with SVG images generated by static/js/viz-global.js. We adjust the SVG output with specific display properties to prevent the global article CSS constraints from stretching the images. For CI deployment, .github/workflows/deploy.yml and pr.yml are updated to install Node.js v6 and execute the SSR script after the Hugo build. To keep the repository clean, local node dependencies are excluded via an updated .gitignore. Finally, for local development ergonomics, layouts/_default/baseof.html dynamically injects a client-side fallback exclusively on pages containing diagrams. Assisted-by: Gemini and Claude Signed-off-by: Jason Zbakh <jzbakh@gmail.com>
Replace the legacy ASCII art diagrams using the newly integrated Graphviz pipeline. The visualizations are decoupled to maintain strict arrow proportions and support native browser zooming without breaking layout alignment. Signed-off-by: Jason Zbakh <jzbakh@gmail.com>
The configuration commands for modifying the default behavior of `git pull` were previously grouped into a single block of shell code. I've converted this block into a bulleted list with distinct bold headings and embedded code blocks to improve visual consistency with the rest of the page. Signed-off-by: Jason Zbakh <jzbakh@gmail.com>
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.
This Pull Request modernizes the "Choosing the default behavior of git pull" page by replacing the legacy ASCII art with native Graphviz diagrams. To achieve this without penalizing the end-user with heavy client-side JavaScript, we port the Server-Side Rendering (SSR) pipeline from our sibling sites.
Infrastructure: Graphviz SSR Pipeline
git-scm.comandgitgitgadget.github.io.```graphvizcode blocks.script/graphviz-ssr.js) executed via GitHub Actions that replaces the markdown code blocks with static, fully computed inline SVG images usingviz.js.display: block; width: auto;) to prevent the globalwidth: 65%article constraint from stretching the diagrams, ensuring they remain properly left-aligned.layouts/_default/baseof.htmlconditionally injects a client-side fallback exclusively on pages containing diagrams, allowing seamless local development withhugo serve.Content: Pull Behavior Page