Repository navigation
Add magazine reading system for 2014books - #5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0893052241
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| prev_link = f'<a href="chapter-{prev_ch["chapter_num"]:02d}.html">← 上一章</a>' if prev_ch else '<span></span>' | ||
| next_link = f'<a href="chapter-{next_ch["chapter_num"]:02d}.html">下一章 →</a>' if next_ch else '<span></span>' | ||
|
|
||
| og_image = "https://conanxin.github.io/2014books/assets/og-cover.svg" |
There was a problem hiding this comment.
Use a raster image for social cards
When these pages are shared on X/Twitter, the card image is pulled from og:image because no twitter:image is set, but the X Cards markup docs list JPG/PNG/WEBP/GIF as supported and explicitly say SVG is not supported. Since this new sharing feature points every chapter card at an SVG, the large-image preview can render without an image on that platform; generate/reference a PNG or JPG version for the OG/Twitter image instead.
Useful? React with 👍 / 👎.
Summary
This PR upgrades the 2014books website from a single-page magazine-style archive into a more complete digital reading system.
What changed
web/chapters/data/reading_paths.jsonwith initial reading routesweb/assets/og-cover.svggenerate_web.pyto generate both homepage and standalone chapter pages.gitignoreto exclude generated release packagesValidation
python3 -m py_compile scripts/generate_web.pyPASSpython3 scripts/generate_web.pyPASSmake webPASSmake epubPASSmake pdfPASSNotes
This PR does not change the verified book count. The official structured book list remains at 97 verified entries. Low-confidence missing-book candidates remain isolated outside the official
books.json.