research-document
Adding A Research Repository
Adding A Research Repository
Five-Minute Setup
- Install the
research-publisherpackage into the repository. - Add a
research-publisher.config.mjsfile with site, content, output, and branding settings. - Point
content.includeat the repository's Markdown corpus. - Run
npm ci. - Run
npm run research:build.
Repository-Specific Surface
Keep repository-specific changes limited to:
research-publisher.config.mjs- Markdown content
- Optional brand variables
The core package, Astro layouts, and search integration should stay shared.
Git Submodule Layout
If you keep the publisher in a submodule, treat the content repository as the project root:
- store
research-publisher.config.mjsin the main repository - point
content.includeat paths in the main repository - keep
output.directoryin the main repository, for exampledist - invoke the publisher from the main repository while referencing the config there
In that layout, the publisher package supplies code and templates, while dist/, Pagefind output, catalogs, and diagnostics stay in the main repository.
Git Dependency Layout
The recommended multi-repository setup is a Git dependency instead of a submodule:
npm install -D git+https://github.com/kemiller2002/research-publisher.git#v0.1.0
Then keep the consumer repository focused on:
research-publisher.config.mjs- content directories such as
research/ - local build output such as
dist/
Test changes locally by editing the package repository, running npm test, npm run smoke:consumer, and npm run research:build, then tag a release and update the consumer repository to that tag.