Separates writing from deploying: content now lives in its own repo and the site
pins a commit of it.
Chose a submodule over a remote content loader specifically to keep the existing
pipeline intact. Because the files stay at the same physical path, everything
resolves exactly as before:
- Astro content collections (the glob loaders keep base ./src/content/<dir>)
- the `image()` schema helper, which resolves relative to the .md file
- blog/lan-dau-viet-truyen.mdx importing "@/components/Callout.astro" — that
alias points into the site's src/, which still contains the submodule
- Pagefind indexing and build-time OG generation
A remote loader would have broken the middle two.
27 entries moved: blog 3, stories 2, projects 2, faq 3, gallery 12, legal 6.
CONTENT-LICENSE.md is copied into the content repo so the All-Rights-Reserved
terms travel with the content — both repos are public now, and the site repo's
GPL-3.0 LICENSE must not be read as covering the stories and photos.
- ci.yml checkout gains `submodules: recursive`; without it the collections
resolve to an empty directory and the build dies on the first getCollection()
- .prettierignore now skips src/content/: formatting a submodule from the
parent leaves it permanently dirty, and the reformat could never be committed
from here anyway
Note: a commit in the content repo does NOT deploy on its own — the site builds
from the commit it has pinned, so publishing is a two-step (commit there, bump
the pointer here). That is the intended tradeoff of pinning.
Verified locally: 61 pages build, Callout renders inside the MDX post, CSP guard
343/343, check/lint/knip/prettier green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4 lines
93 B
Plaintext
4 lines
93 B
Plaintext
[submodule "src/content"]
|
|
path = src/content
|
|
url = https://github.com/poli0981/content.git
|