Build Your Own Content Management System (CMS) From a Template
Repository templates allow you to generate your new repository with the same structure and files as the original. This blog post introduces you to the repository template for Fermyon’s Content Management System (CMS), Bartholomew. In this blog post, we show you how to build and run your own customizable CMS, quickly and easily.
Bartholomew is a lightweight CMS that serves content via WebAssembly (Wasm) modules. All web pages and blog posts in Bartholomew are created as simple Markdown files, each with a simple TOML header. This makes writing content easy and efficient. Creating your own Bartholomew instance is as easy as following a few simple steps. Let’s get started.
The first step is to install Spin. Spin is an open-source framework for building and running fast, secure, and composable cloud microservices with WebAssembly. The easiest and quickest way to install Spin is to fetch a binary release file from Spin’s releases page. You will notice that there are binary releases for Linux, macOS and Windows.
Once you have fetched the binary release, simply ensure that the location of the
spin executable (which is contained within the release you fetched) is added to your machine’s system path.
Using the Template
We can now generate a new repository with the same directory and file structure as the Bartholomew site template. Simply visit the template’s location and click on the green
Use this template button. This will create a repository in your GitHub account.
There is some additional GitHub documentation about creating a repository from a template if you are interested.
Spin Up Your CMS
The following command will spin up the CMS:
spin up --follow-all
The output from the above command will look similar to the following:
~/bartholomew-site-template$ spin up --follow-all Preparing Wasm modules is taking a few seconds... Serving http://127.0.0.1:3000 Available Routes: bartholomew: http://127.0.0.1:3000 (wildcard) fileserver: http://127.0.0.1:3000/static (wildcard)
As shown in the command line interface above, your site will now be available on port 3000 via localhost.
As you may now realize, we just installed and ran a WebAssembly-powered CMS without having to install anything but Spin. For this presentation we used a completely fresh system that did not even have Rust or any other dependencies installed. Whilst the Bartholomew CMS does have many working parts these are all included in the template which we used (pre-compiled
wasm files and all). We will take a deeper dive into the separate components which make up Bartholomew in a future blog post. In that upcoming post, we will demonstrate building each of the components from source and so forth. But for now, we hope you had fun spinning up a CMS.
A Little Help?
If you like the idea of a frictionless production-ready CMS which can help grow a business or a brand, whilst reducing costs please reach out. For example, if you are trying to set up your own Bartholomew CMS and have any questions, please go ahead and jump into our Discord space. You will find channels there specifically related to Bartholomew and more.
There are a few other ways to get in touch, see the Fermyon contact details section below … and thanks for reading.
Fermyon Contact Details
We would love to hear what you are building and also help you out to ensure that you create Wasm applications beyond your wildest dreams.
Discord: We have a great Discord presence. Please join us in Discord and ask questions and share your experiences with Fermyon products like Spin.
Twitter: Following and subscribing to our Twitter is a great way to keep in touch.
GitHub: We can be reached via GitHub.
Email: Please feel free to Email us.
Become an Insider
If you would like to “Become an Insider”, please fill out this brief form to get early access, deeper insights and other insider invitations.
We Are Hiring
We have several job openings available in areas of training, software engineering, developer relations, community management and more.