@vyriy/ssg
v0.9.15
Published
Static Markdown site generator for Vyriy projects.
Readme
@vyriy/ssg
Static generation helpers for vyriy.dev.
Usage
import { buildStaticSite } from '@vyriy/ssg';
await buildStaticSite();By default, buildStaticSite renders:
site/home/README.mdtodist/index.htmlsite/docs/README.mdtodist/docs/index.htmlsite/docs/**/README.mdtodist/docs/**/index.htmlsite/blog/**/README.mdtodist/blog/**/index.htmlsite/examples/**/README.mdtodist/examples/**/index.html- generated docs, blog, and example entries to sibling
.mdfiles such asdist/docs/ssg.md,dist/blog/post.md, anddist/examples/demo.md site/consulting/README.mdtodist/consulting/index.htmldist/blog/index.htmlanddist/examples/index.htmlcatalog pages, plus numbered catalog pages when pagination is neededdist/404.htmldist/sitemap.xml,dist/robots.txt, anddist/llms.txt
When the script is executed from dist, it reads content from the parent project
directory and writes into the current dist directory. Blog, documentation, and
example entries with published: false are skipped.
Vyriy SSG can emit .md versions of generated content pages next to HTML
pages. This gives agents, LLM tools, and crawlers a clean text representation of
docs, blog posts, and examples while preserving the normal human-facing HTML
site. Generated content HTML pages also include a
<link rel="alternate" type="text/markdown"> tag that points to the Markdown
artifact. The generated home page includes lightweight discovery <link> tags
for /llms.txt, /docs/, and /sitemap.xml.
Exports
buildStaticSitebuilds the static home page, documentation page, consulting page, 404 page, blog pages, example pages, and section index pages.renderRobotsTxtandwriteRobotsTxtcreate a crawler policy that allows all indexing, points to the sitemap, and emits permissive content signals for search and AI usage.renderLlmTxtandwriteLlmTxtcreate a readable LLM index for main pages and published content sections.getWebPageJsonLdandrenderJsonLdScriptcreate safe WebPage JSON-LD for rendered HTML documents.renderMarkdownPage,writeMarkdownPage, andgetMarkdownOutputPathcreate agent-readable Markdown artifacts for generated content pages.BuildStaticSiteOptionsconfigures source, output, stylesheet, Google Analytics measurement ID, and current working directory paths.PageDatadescribes parsed Markdown page content and metadata.
