@echelon-foundry/research-publisher
v0.1.1
Published
Publish structured research documents as a searchable static website.
Maintainers
Readme
Research Publisher
Reusable Markdown-to-static-web publishing package for research repositories.
What This Repo Is
This repository is the installable publisher package. The repository root is the package root, which makes it consumable directly from Git.
Consumer repositories should keep:
research-publisher.config.mjsresearch/input-documents/- generated
dist/
This repo also contains a demo research corpus and GitHub Pages site at the root so the package can be exercised locally before release.
Responsibilities
- Discover Markdown content through config globs
- Normalize and validate research metadata
- Generate a public catalog and relationship graph
- Generate project guides from explicit entry-point metadata
- Render a static Astro site
- Generate a Pagefind full-text search index
Commands
research-publisher inventory --config ./research-publisher.config.mjsresearch-publisher validate --config ./research-publisher.config.mjsresearch-publisher build --config ./research-publisher.config.mjsresearch-publisher build --config ./fixtures/alt-research/research-publisher.config.mjsresearch-publisher install-prompt --config ./research-publisher.config.mjsnpm run smoke:consumer
Local Testing
npm testruns unit and integration testsnpm run research:buildbuilds the demo site in this reponpm run smoke:consumerpacks the package and installs it into a temporary consumer project to verify package-style usage
Install From npm
In a consuming repository:
npm install -D @echelon-foundry/research-publisherThen initialize the repository:
npx research-publisher initThe initializer is safe to rerun. It:
- creates
research-publisher.config.mjsonly when missing - installs
prompts/research-publisher-mark-documents.mdonly when missing - adds missing research scripts while preserving existing scripts
- uses broad Markdown discovery with generated, vendored, prompt, and archive exclusions
It does not use postinstall because dependency installation should not silently rewrite a consumer repository. Review the generated site URL and base path before deploying.
Host colors
Research Publisher supplies a complete default palette. A host repository can override semantic color roles in research-publisher.config.mjs without copying or changing package CSS:
branding: {
cssVariables: {
"--color-accent": "#2457a6",
"--color-accent-strong": "#173b73",
"--color-accent-soft": "#dce8fa"
}
}Unspecified roles retain their package defaults, preserving layout and visual unity across sites. See Theming Research Publisher for the supported color roles and accessibility guidance.
Then add scripts like:
{
"scripts": {
"research:build": "research-publisher build --config ./research-publisher.config.mjs",
"research:validate": "research-publisher validate --config ./research-publisher.config.mjs",
"research:inventory": "research-publisher inventory --config ./research-publisher.config.mjs"
}
}The engine resolves Astro and Pagefind from the installed package, while content discovery, diagnostics, and generated search files stay in the consuming repository.
Organizing Different Kinds Of Reading
Research Publisher keeps document type, project ownership, reader purpose, audience, and front-page placement separate. This prevents free-form tags from becoming an unstable navigation system.
See Document Purpose And Project Guide Architecture. Install the reusable corpus-classification prompt in a consumer repository with:
npx research-publisher install-prompt --config ./research-publisher.config.mjs