You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BurnyLlama d19b677a00 Added copyright information. 1 year ago
assets Removed all 'text-align: justify;' 2 years ago
content Implemented sitemaps. 2 years ago
libs Implemented sitemaps. 2 years ago
.gitignore Now ignoring package-lock.json 2 years ago
LICENSE Added copyright information. 1 year ago ToC is now automaticcaly server-side rendered. 2 years ago
config.json Basic CMS done. 2 years ago
index.js Implemented sitemaps. 2 years ago
package.json Version bump 2 years ago

qwik cms

This is a really basic CMS. But it will get the job done. It basically operates really simple. It checks what path a client is trying to access and checks if there is a corresponding file for that. After that it renders the file if it exists (if not it sends a 404 error).



  • node
  • npm


git clone
cd qwik-cms
npm i
node index.js

Extra info

Even tho it can be annoying, I would recommend looking through what code this will run on your PC/server. Otherwise you would have to take my word for it, which could be a bad idea. (Although I can promise you that there is no malicious code or dependency in this project AFAIK.)

The project depends on the following packages (installed when you ran npm i):

  • express (a web server framework)
  • nunjucks (a templating engine)
  • nunjucks-markdown (markdown support in nunjucks)
  • marked (markdown parser/compiler)
  • highlight.js (syntax highlighting)
  • jsdom (an extension that can use the DOM server-side - used to render the ToC)
  • chokidar (reload templates if they change on disk)
  • fs (used for filesystem operations)


I recommend forking (or just cloning) this repository if you want a long-term solution for stuff like multiple people working on the site.

How do I create pages?

Let's say you want a page on the path /foo, then you can create the corresponding file in two places:

  • {contentDir}/pages/foo.njk
  • {contentDir}/pages/foo/index.njk

/foo/bar would be in either of:

  • {contentDir}/pages/foo/bar.njk
  • {contentDir}/pages/foo/bar/index.njk

If both files exist the first one specified is rendered. {contentDir} is configured in config.json and its default is content/.

The documents are written in the nunjucks templating language which means you can use imports/includes/etc for code reusability.


The default configuration looks like this:

    "contentDir": "content",
    "assetsDir": "assets",

    "serverPort": "8789",
    "serverName": "qwik"

The file is called config.json.



Specifies which directory the content is in.

Default: content


Specifies which directory the assets are in. These items will be statically available on (your site's) /assets/. I recommend storing CSS, images, etc. here.

Default: assets


The port the server should run on.

Default: 8789


This can be accessed in any page/template by using {{ serverName }}

Default: qwik

Future features

I have some ideas on things that would be good to implement, one of which is plugins/extensions that can provide extra functionality.

As an example, it would be cool to be able to implement sidebars that contains all pages (if you're making a blog or wiki/documentation).

It would also be nice to have a plugin that could auto update (and restart) the server if you make changes to a git repository. (You could do this with cronjobs in theory, but this should be the server's responsibility.)