Name: metalsmith-prismic-template
Owner: Futurice
Description: Template for static site generation with prismic.io and metalsmith
Created: 2016-02-22 07:40:08.0
Updated: 2018-05-02 08:50:54.0
Pushed: 2016-07-13 11:27:34.0
Homepage: null
Size: 192
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
An opinionated, bare bones template for static site generation from prismic.io using metalsmith and deploying to Amazon S3. Read more from the blog post CMS done right, vol 3.
npm install
.env.tmpl
and rename to .env
(this will be ignored by git)npm run dev
to test this template with example data.env
PRISMIC_TOKEN={PRISMIC_API_ACCESS_TOKEN}
.env
PRISMIC_URL=https://{PRISMIC_APP_NAME}.prismic.io/api
PRISMIC_SECRET={PRISMIC_WEBHOOK_SECRET}
docs/prismic-conventions
for best practicesprismic-custom-types/
for this example repositories custom type json files, that can be copied to your Prismic repository.env
AWS_ACCESS_KEY_ID={AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY={AWS_SECRET_ACCESS_KEY}
S3_BUCKET={S3_BUCKET_NAME}
S3_REGION={S3_END_POINT}
, e.g. 'eu-west-1'AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
PRISMIC_SECRET
PRISMIC_TOKEN
PRISMIC_URL
server.js
server.js
that generates prismic links and paths of prismic collectionsdocs/prismic-conventions.md
src/
, /layouts
and partials/
directories' to match your content to Prismicnpm run dev
. The development mode has live reloading but needs to be restarted manually if content in Prismic.io changes.builds/
: Output directory for built siteslayouts/
: Page layoutspartials/
: Embeddable page elementsplugins/
: Custom metalsmith pluginsprismic-custom-types/
: Backups of Prismic custom typessrc/
: Source files which will be transformed to outpututils/
: Utility functionsserver.js
: Server and build logic with metalsmith-pluginsmetalsmith-s3
with metalsmith-azure-storage
in package.json
and server.js
Metalsmith-prismic-template is licensed with MIT License. It was developed by Futurice in co-operation with our customers Finavia and Clear Funding.