SiestaCMS

A lightweight, simple, database free, serverless CMS for lazy people. Written in 70 180 lines of JavaScript, 40 70 lines of HTML, and 100 80 lines of CSS

GitHub

How to use it

11/14/2020

First, install your own SiestaCMS distribution by following the installation guide.

SiestaCMS is a database free CMS. This means that the content is managed by editing XML files with a specific format.

How to upload content

You can either use the local /posts folder or a S3 bucket that gets automatically provisioned the first time you deploy SiestaCMS.

How to use S3

Once you deploy the application for the first time, you should have a bucket in your account. You can set provider.environment.USE_S3 to true in serverless.yml and configure the bucket if you want to.

You can use the terminal to push your files, assuming they are under /posts folder: aws s3 sync posts s3://<BUCKET NAME>:

How to use the local folder

Put the files under /posts and then deploy a new version using make deploy-prod. Make sure provider.environment.USE_S3 is set to false in serverless.yml

Files format

Posts are just XML files with .html extension to make things simpler. They include the post's content and some metadata.

A SiestaCMS post file contains 2 main sections: header and body.

Header

The header contains these fields:

  • title: Title of the post (string)
  • date: Date of the post (currently, ab unformatted string does the trick)
  • summary: A summary (string) that will be used in the index
  • image: An image URL that can be used in the template (for example, to complete metadata for social networks)

Body

The body contains the HTML code for the post. It's not parsed or validated. For example, an example based on this same page:

    <head>
        <title>How to use it</title>
        <date>11/14/2020</date>
        <summary>How to manage content with SiestaCMS.</summary>
        <image></image>
    </head>
    <body>
        <p>SiestaCMS is a database free CMS.</p>
    </body>

More customization options

You can change the route used for the posts using serverless.yml. For example, if you want to use /pages instead of /posts, just change the value under provider.environment.POSTS_PATH.