Skip to content

mastrojs/template-pages-cms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro Template Pages CMS

This is a TypeScript template for Mastro when using Deno with the git-based Pages CMS.

To make edits using the CMS:

  1. Click the green button Use this template on the top right, select Create a new repository and choose a name for your project. (To deploy to GitHub Pages for free, your repo needs to be public.)

  2. Then open Pages CMS, log in with your GitHub account and give it permission to access your GitHub repository.

Deploy

Finally, you'll also want to Publish your website to GitHub Pages or another static site host.

Deploy to a subdirectory (e.g. GitHub Pages)

If your site is at a URL like https://my-name.github.io/my-repo you'll want to adjust the media section .pages.yml to:

media:
  input: routes/media
  output: /my-repo/media

where my-repo is your actual repository name.

Run locally

deno task start

and open http://localhost:8000 in your browser, or see install instructions.

To generate the whole static site (this will create a generated folder):

deno task generate

This template uses Deno (which is recommended), but you can also use Node.js or Bun: replace the deno.json with a package.json, and adjust the server.ts as seen in the Node.js template or Bun template respectively.

🚀 Next steps

To learn more about Mastro and building websites, follow the guide.

For a condensed overview of the Mastro web framework and static site generator, consult the Mastro Docs.

To make sure you're using the latest Mastro packages:

deno update --latest "@mastrojs/*"

About

Basic template for a Mastro project using Pages CMS

Topics

Resources

Stars

Watchers

Forks