Skip to content

cdp1337/markdownmaster

Repository files navigation

MarkdownMaster CMS

MarkdownMaster CMS is a 100%* client-side, no-database, flat-file framework to render a full HTML site from flat Markdown content files and HTML templates, in the spirit of Jekyll.

This CMS behaves as a Single-Page Application and loads all files from the server via the auto-index feature in either Apache or Nginx and performs all processing of templates and content within the browser.

Note* for SEO reasons, there is a server-side Python component which will return a generated version of the requested page similar to the client-side application. This is unnecessary for normal users, but is required to ensure that crawlers can access the site data.

This feature can be disabled via .htaccess or nginx.conf if desired.

Because there is no database, registry, or administration of pages, deploying new pages is as simple as just uploading Markdown files to your server. This can be done via automated sync applications such as NextCloud or just uploading via SFTP or your web hosting interface. No building or scripts needed for deployment!

This project is originally based from Chris Diana's CMS.js.

MarkdownMaster CMS Screenshot


Version GitHub Workflow Status License

Features

  • Zero dependencies
  • Abstract content types
  • Custom templates
  • Search, filtering, tagging and sorting
  • Apache, Nginx, Mail-in-a-box, and Nextcloud support
  • Small footprint
  • marked.js embedded (still included, but not used by default)
  • Remarkable embedded
  • Automatic body classes based on page (addon)
  • Native JS events
  • Full History API support
  • Crawler and SEO support for most content
  • Automatic sitemap.xml generation

Demo

Check out a live working site!

Quick Start

  1. Download the latest release
  2. Setup environment, refer to specific documentation for NextCloud, Mail-in-a-Box, or Apache for more information.
  3. Configure config.js and config.ini to your liking

Documentation

For advanced usage of this framework, take a look through the other post examples and the various documentation available.

How it works

MarkdownMaster CMS takes advantage of the server's directory indexing feature. By allowing indexes, MarkdownMaster CMS sends an AJAX call to your specified folders and looks for Markdown and HTML files. After they are found, it takes care of everything else and delivers a full website.

Bots and crawlers automatically get routed to /cgi-bin/crawler.py to have the server perform the markdown-to-HTML transformation. This script utilizes the same exact markdown files as normal visitors, so the content will be mostly consistent.

Migration from Jekyll

Importing Posts

Once MarkdownMaster CMS is installed and running, simply copy all of your posts from your Jekyll project's _post folder to your designated MarkdownMaster CMS posts folder.

Importing Pages

Copy all of your Markdown pages from your Jekyll projects root folder into your designated MarkdownMaster CMS pages folder.

Debugging

Debug mode can be enabled on your live site by appending ?testdebug=1 to the URL. This will force the CMS into debug mode where messages are printed to the browser console.

Testing bot and crawler responses can be done by append ?testcrawler=1 to the URL. This will route to the cgi-bin Python version of the site which should be seen by GoogleBot and crawlers.

Thanks!