Join us at Jamstack Conf Virtual, October 6-7. Register now!
Sphido is pure static site generator written with speed, simplicity and flexibility in mind.
$ npm i @sphido/core @sphido/frontmatter @sphido/marked @sphido/meta @sphido/nunjucks
const globby = require('globby')
const { getPages } = require('@sphido/core')
const { save } = require('@sphido/nunjucks')
;(async () => {
// 1. get list of pages
const pages = await getPages(
await globby('content/**/*.md'),
...[
require('@sphido/frontmatter'),
require('@sphido/marked'),
require('@sphido/meta'),
{ save },
]
)
// 2. save them (with default template)
for await (const page of pages) {
await page.save(page.dir.replace('content', 'public'))
}
})()
See more examples on GitHub.
StaticGen is hosted and maintained by Netlify, the perfect way to deploy your Jamstack sites and apps.