Skip to content

mastrojs/template-sveltia-cms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro Template Sveltia CMS

This is a TypeScript template for Mastro when using Deno with the git-based Sveltia CMS (alpha docs).

To start, 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.)

Deploy

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

Change the backend -> repo field in config.yml to your actual my-user/my-repo (the values from https://github.com/my-user/my-repo).

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

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

public_folder: /my-repo/media

where my-repo is your actual repository name.

Run locally

deno task start

and open http://localhost:8000 and/or http://localhost:8000/admin/ 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 Sveltia CMS

Topics

Resources

Stars

Watchers

Forks