Releases: cdp1337/markdownmaster
MarkdownMaster CMS v4.0.2
Release Notes
New Features
- Include a simple background-slider plugin
- Include fslightbox-basic for a simple lightbox
Fixes
- Fix support for Apache web servers
Changes
Upgrade from 2.x
Since this has been a substantial rewrite, some features will require updating,
(depending on what is used on your specific site).
URLs
Page URLs have been changed from query hashes to full standard URLs via the History API.
This requires a new .htaccess
or nginx.conf
to be installed
(depending on the server you chose). Consult the respective file within examples/
.
Plugins
Plugins have been retooled and need refactored to work correctly.
Given the default example plugin:
// 2.x Example plugin
function myPlugin() {
// Do some code
console.log('loading test plugin');
}
// Config
var config = {
// ...
// Pass in any custom functions or plugins here and access the CMS object.
plugins: [
myPlugin,
],
// ...
// This function will be called once the CMS instance is loaded and ready.
onload: function() {
// ...
// Access the loaded plugins like this.
blog.myPlugin();
},
};
This example plugin would need to be rewritten to:
// 3.x+ plugin
blog.registerPlugin(
'myPlugin',
{
init: () => {
// Do some code
console.log('loading test plugin');
}
}
);
// Access the loaded plugins like this.
blog.getPlugin('myPlugin');
onload/onroute
The configurable options onload
and onroute
are still supported,
but this functionality has been ported to the following code:
/**
* Called immediately upon successful initialization of the CMS
*
* @param {CMS} event.detail.cms The CMS object passed for reference
*/
document.addEventListener('cms:load', event => {
event.detail.cms.debuglog('CMS initialized and ready to run user-specific code!', event.detail.cms);
});
/**
* Called after any page load operation
*
* @param {CMS} event.detail.cms CMS object for reference if needed
* @param {FileCollection[]|null} event.detail.collection Collection of files to view for listing pages
* @param {File|null} event.detail.file Single file to view when available
* @param {string} event.detail.mode Type of view, usually either "list", "single", or error.
* @param {string} event.detail.search Any search query
* @param {string} event.detail.tag Any tag selected to view
* @param {string} event.detail.type Content type selected
*/
document.addEventListener('cms:route', event => {
event.detail.cms.debuglog('Page being displayed', event.detail);
});
Upgrade from 3.0.x
- Configure
cgi-bin/config.ini
with values that mimicjs/config.js
- Upload
cgi-bin
to your server - Add new directives from
nginx.conf
into your site config - Run the following code (with the appropriate SITEPATH)
apt install fcgiwrap python3 python3-venv
python3 -m venv /opt/markdownmaster
/opt/markdownmaster/bin/pip3 install Markdown beautifulsoup4 python-frontmatter lxml
chmod +x "${SITEPATH}/cgi-bin/crawler.py"
chmod +x "${SITEPATH}/cgi-bin/sitemap.py"
chmod +x "${SITEPATH}/cgi-bin/meta.py"
Upgrade from 3.1.x
Tags and other lists in Markdown files now expect to be YAML-compatible lists
tags: blah, foo
=>tags: [blah, foo]
- Dates listed as
date: 2023-01-01
will be rendered as Date objects,
switch todate: '2023-01-01'
(with quotes) for best results
Banners and images no longer auto-resolve as URLs, instead src
or href
needs to be
used in YAML data
banner: somefile.jpg
=>banner: { src: somefile.jpg }
Moved some plugins to built-in
site.enablePlugin(['pagelist'])
=> N/A (built-in)site.enablePlugin(['search'])
=> N/A (built-in)site.enablePlugin(['remarkable'])
NEW RENDERER
MarkdownMaster CMS v4.0.1
Release Notes
New Features
Fixes
Changes
Upgrade from 2.x
Since this has been a substantial rewrite, some features will require updating,
(depending on what is used on your specific site).
URLs
Page URLs have been changed from query hashes to full standard URLs via the History API.
This requires a new .htaccess
or nginx.conf
to be installed
(depending on the server you chose). Consult the respective file within examples/
.
Plugins
Plugins have been retooled and need refactored to work correctly.
Given the default example plugin:
// 2.x Example plugin
function myPlugin() {
// Do some code
console.log('loading test plugin');
}
// Config
var config = {
// ...
// Pass in any custom functions or plugins here and access the CMS object.
plugins: [
myPlugin,
],
// ...
// This function will be called once the CMS instance is loaded and ready.
onload: function() {
// ...
// Access the loaded plugins like this.
blog.myPlugin();
},
};
This example plugin would need to be rewritten to:
// 3.x+ plugin
blog.registerPlugin(
'myPlugin',
{
init: () => {
// Do some code
console.log('loading test plugin');
}
}
);
// Access the loaded plugins like this.
blog.getPlugin('myPlugin');
onload/onroute
The configurable options onload
and onroute
are still supported,
but this functionality has been ported to the following code:
/**
* Called immediately upon successful initialization of the CMS
*
* @param {CMS} event.detail.cms The CMS object passed for reference
*/
document.addEventListener('cms:load', event => {
event.detail.cms.debuglog('CMS initialized and ready to run user-specific code!', event.detail.cms);
});
/**
* Called after any page load operation
*
* @param {CMS} event.detail.cms CMS object for reference if needed
* @param {FileCollection[]|null} event.detail.collection Collection of files to view for listing pages
* @param {File|null} event.detail.file Single file to view when available
* @param {string} event.detail.mode Type of view, usually either "list", "single", or error.
* @param {string} event.detail.search Any search query
* @param {string} event.detail.tag Any tag selected to view
* @param {string} event.detail.type Content type selected
*/
document.addEventListener('cms:route', event => {
event.detail.cms.debuglog('Page being displayed', event.detail);
});
Upgrade from 3.0.x
- Configure
cgi-bin/config.ini
with values that mimicjs/config.js
- Upload
cgi-bin
to your server - Add new directives from
nginx.conf
into your site config - Run the following code (with the appropriate SITEPATH)
apt install fcgiwrap python3 python3-venv
python3 -m venv /opt/markdownmaster
/opt/markdownmaster/bin/pip3 install Markdown beautifulsoup4 python-frontmatter lxml
chmod +x "${SITEPATH}/cgi-bin/crawler.py"
chmod +x "${SITEPATH}/cgi-bin/sitemap.py"
chmod +x "${SITEPATH}/cgi-bin/meta.py"
Upgrade from 3.1.x
Tags and other lists in Markdown files now expect to be YAML-compatible lists
tags: blah, foo
=>tags: [blah, foo]
- Dates listed as
date: 2023-01-01
will be rendered as Date objects,
switch todate: '2023-01-01'
(with quotes) for best results
Banners and images no longer auto-resolve as URLs, instead src
or href
needs to be
used in YAML data
banner: somefile.jpg
=>banner: { src: somefile.jpg }
Moved some plugins to built-in
site.enablePlugin(['pagelist'])
=> N/A (built-in)site.enablePlugin(['search'])
=> N/A (built-in)site.enablePlugin(['remarkable'])
NEW RENDERER
MarkdownMaster CMS v4.0.0
Promise it's 2023?
Completely overhaul the entire CMS to implement a modern and more
powerful asynchronous system for everything, Promises!
This removes the need to keep track of callback functions everywhere
and offloads that work to the browser instead.
New Features
Images, links, and paragraphs now support {...} format of inline text
to define custom HTML parameters for rendered elements.
Support CSS-style selectors and any valid HTML attribute,
(including quoted text).
- New support for HTML attributes inline
- Include Prism.JS as an extra for sites
- Include FontAwesome as an extra for sites
- Better error management
- Better logging support
- Better support for external scripts
- Add fetchLayout and renderLayout
- Add support for filtering files by date published
- New convenience method CMS.getCollection
- New support for complex filtering of files
- Add CMS-Author tag for embedded author snippet
- Add CMS-Button tag for stylized buttons from a-elements
- URLs in FrontMatter now support multiple values
- New support for sticky pages
- New support for multiple sort keys
- Include listing pages in sitemap.xml
- New server-side support for loading page metadata
- New debug parameters for DEBUG and crawlers
- Filecollection getTags now can sort and provide weighted values
Fixes
- Do not include DRAFT pages in taglist
- Fix beginning newline on sitemap
- Fix for FrontMatter overwriting functions
- Fix parsing of files with no FrontMatter
- Fix bug where images inside anchors were not dispatching the router
- FrontMatter now correctly handles YAML parsing
- Fix listing pages for crawlers
- Fix draft pages from showing in sitemap.xml
- Add canonical URL to crawler pages
- Crawler pages now render the template to provide full links and previews
- Fix support for abbr tags in markdown
Changes
- Removed Github support (it was broken anyway on this fork)
- Switch to new Configuration system
- Switch to Promises for async operations
- Move CMS-Pagelist to a standardized customElement
- Move CMS-Search to a standardized customElement
- URL-type properties now require
src
orhref
subattributes - The date formatting by default is now locale-aware
- Switched default markdown renderer from marked to remarkable
Upgrade from 3.1.x to 4.0.x
Tags and other lists in Markdown files now expect to be YAML-compatible lists
tags: blah, foo
=>tags: [blah, foo]
Banners and images no longer auto-resolve as URLs, instead src
or href
needs to be
used in YAML data
banner: somefile.jpg
=>banner: { src: somefile.jpg }
Moved some plugins to built-in
site.enablePlugin(['pagelist'])
=> N/A (built-in)site.enablePlugin(['search'])
=> N/A (built-in)
Upgrade from 3.0.x to 3.1.x
- Install the fast CGI wrapper on your server,
sudo apt install fcgiwrap
- Configure
cgi-bin/config.ini
with values that mimicjs/config.js
- Upload
cgi-bin
to your server - If necessary, ensure the scripts are executable,
chmod +x cgi-bin/{crawler,sitemap}.py
- Add new directives from
nginx.conf
into your site config (new version has some configurable parameters at the top)
Upgrade from 2.x to 3.x
Since this has been a substantial rewrite, some features will require updating, (depending on what is used on your specific site).
URLs
Page URLs have been changed from query hashes to full standard URLs via the History API. This requires a new .htaccess
or nginx.conf
to be installed (depending on the server you chose). Consult the respective file within examples/
.
Plugins
Plugins have been retooled and need refactored to work correctly. Given the default example plugin:
// Example plugin
function myPlugin() {
console.log('loading test plugin');
}
// Config
var config = {
// ...
// Pass in any custom functions or plugins here and access the CMS object.
plugins: [
myPlugin,
],
// ...
// This function will be called once the CMS instance is loaded and ready.
onload: function() {
// ...
// Access the loaded plugins like this.
blog.myPlugin();
},
};
This example plugin would need to be rewritten to:
blog.registerPlugin(
'myPlugin',
{
init = () => {
console.log('loading test plugin');
}
}
);
// Access the loaded plugins like this.
blog.getPlugin('myPlugin');
onload/onroute
The configurable options onload
and onroute
are still supported, but this functionality has been ported to the following code:
/**
* Called immediately upon successful initialization of the CMS
*
* @param {CMS} event.detail.cms The CMS object passed for reference
*/
document.addEventListener('cms:load', event => {
event.detail.cms.debuglog('CMS initialized and ready to run user-specific code!', event.detail.cms);
});
/**
* Called after any page load operation
*
* @param {CMS} event.detail.cms CMS object for reference if needed
* @param {FileCollection[]|null} event.detail.collection Collection of files to view for listing pages
* @param {File|null} event.detail.file Single file to view when available
* @param {string} event.detail.mode Type of view, usually either "list", "single", or error.
* @param {string} event.detail.search Any search query
* @param {string} event.detail.tag Any tag selected to view
* @param {string} event.detail.type Content type selected
*/
document.addEventListener('cms:route', event => {
event.detail.cms.debuglog('Page being displayed', event.detail);
});
CMS.js v3.1.0
Google Evidently Hates Markdown
Version 3.1.0 features server-side scripts to better assist with crawler visibility, as evidently Google will refuse to fully index markdown content.
The two included server scripts are:
- Sitemap generator
- Crawler-friendly md-to-html generator
Changes
- New server-side scripts to better support crawlers and bots
- Refactor internal method names to be more consistent to their actions
- Fix support for sorting of articles
- Add support for sorting in the page-list plugin
- Add support for multiple filters to be applied at a time
- Add support for lazy-loading markdown content in articles
- Add support for custom URL-type attributes in frontmatter
Upgrade from 3.0.0 to 3.1.0
- Install the fast CGI wrapper on your server,
sudo apt install fcgiwrap
- Configure
cgi-bin/config.ini
with values that mimicjs/config.js
- Upload
cgi-bin
to your server - If necessary, ensure the scripts are executable,
chmod +x cgi-bin/{crawler,sitemap}.py
- Add new directives from
nginx.conf
into your site config (new version has some configurable parameters at the top)
Upgrade from 2.x to 3.x
Since this has been a substantial rewrite, some features will require updating, (depending on what is used on your specific site).
URLs
Page URLs have been changed from query hashes to full standard URLs via the History API. This requires a new .htaccess
or nginx.conf
to be installed (depending on the server you chose). Consult the respective file within examples/
.
Plugins
Plugins have been retooled and need refactored to work correctly. Given the default example plugin:
// Example plugin
function myPlugin() {
console.log('loading test plugin');
}
// Config
var config = {
// ...
// Pass in any custom functions or plugins here and access the CMS object.
plugins: [
myPlugin,
],
// ...
// This function will be called once the CMS instance is loaded and ready.
onload: function() {
// ...
// Access the loaded plugins like this.
blog.myPlugin();
},
};
This example plugin would need to be rewritten to:
blog.registerPlugin(
'myPlugin',
{
init = () => {
console.log('loading test plugin');
}
}
);
// Access the loaded plugins like this.
blog.getPlugin('myPlugin');
onload/onroute
The configurable options onload
and onroute
are still supported, but this functionality has been ported to the following code:
/**
* Called immediately upon successful initialization of the CMS
*
* @param {CMS} event.detail.cms The CMS object passed for reference
*/
document.addEventListener('cms:load', event => {
event.detail.cms.debuglog('CMS initialized and ready to run user-specific code!', event.detail.cms);
});
/**
* Called after any page load operation
*
* @param {CMS} event.detail.cms CMS object for reference if needed
* @param {FileCollection[]|null} event.detail.collection Collection of files to view for listing pages
* @param {File|null} event.detail.file Single file to view when available
* @param {string} event.detail.mode Type of view, usually either "list", "single", or error.
* @param {string} event.detail.search Any search query
* @param {string} event.detail.tag Any tag selected to view
* @param {string} event.detail.type Content type selected
*/
document.addEventListener('cms:route', event => {
event.detail.cms.debuglog('Page being displayed', event.detail);
});
CMS.js v3.0.0
Version 3.x features a nearly completely rewrite of all core concepts of this utilty and a large number of features and bugfixes implemented.
New Features
- Better debug logging support
- Switch to History API for page navigation
- Include SEO and crawler support via rewrite rules
- Add support for nested directories
- Add support for subdirectory web paths
- Add support for SEO page titles
- Add support for automatic change timestamps
- Fix support for images in meta attributes
- Add support for full text searching
- Add support for retrieving tags for an entire collection
- Add support for dynamic body classes
- Include marked.js for better markdown support
- Better nginx support
- Fix image URLs relative to the markdown source file in meta tags
- Retool plugin functionality
- Add several plugins to core system
Upgrade from 2.x to 3.x
Since this has been a substantial rewrite, some features will require updating, (depending on what is used on your specific site).
URLs
Page URLs have been changed from query hashes to full standard URLs via the History API. This requires a new .htaccess
or nginx.conf
to be installed (depending on the server you chose). Consult the respective file within examples/
.
Plugins
Plugins have been retooled and need refactored to work correctly. Given the default example plugin:
// Example plugin
function myPlugin() {
console.log('loading test plugin');
}
// Config
var config = {
// ...
// Pass in any custom functions or plugins here and access the CMS object.
plugins: [
myPlugin,
],
// ...
// This function will be called once the CMS instance is loaded and ready.
onload: function() {
// ...
// Access the loaded plugins like this.
blog.myPlugin();
},
};
This example plugin would need to be rewritten to:
blog.registerPlugin(
'myPlugin',
{
init = () => {
console.log('loading test plugin');
}
}
);
// Access the loaded plugins like this.
blog.getPlugin('myPlugin');
onload/onroute
The configurable options onload
and onroute
are still supported, but this functionality has been ported to the following code:
/**
* Called immediately upon successful initialization of the CMS
*
* @param {CMS} event.detail.cms The CMS object passed for reference
*/
document.addEventListener('cms:load', event => {
event.detail.cms.debuglog('CMS initialized and ready to run user-specific code!', event.detail.cms);
});
/**
* Called after any page load operation
*
* @param {CMS} event.detail.cms CMS object for reference if needed
* @param {FileCollection[]|null} event.detail.collection Collection of files to view for listing pages
* @param {File|null} event.detail.file Single file to view when available
* @param {string} event.detail.mode Type of view, usually either "list", "single", or error.
* @param {string} event.detail.search Any search query
* @param {string} event.detail.tag Any tag selected to view
* @param {string} event.detail.type Content type selected
*/
document.addEventListener('cms:route', event => {
event.detail.cms.debuglog('Page being displayed', event.detail);
});
CMS.js v2.9.10
Second test with github workflows for auto-release creation
- Better debug logging support
- Switch to History API for page navigation
- Include SEO and crawler support via rewrite rules
- Add support for nested directories
- Add support for subdirectory web paths
- Add support for SEO page titles
- Add support for automatic change timestamps
- Fix support for images in meta attributes
- Add support for full text searching
- Add support for retrieving tags for an entire collection
- Add support for dynamic body classes
- Include marked.js for better markdown support
- Better nginx support
- Fix image URLs relative to the markdown source file in meta tags
- Retool plugin functionality
- Add several plugins to core system