Skip to content

➿ WordPress plugin to add markdown content from to a WP blog; based on https://.com/ghandic/nbconvert

License

NotificationsYou must be signed in to change notification settings

gis-ops/md--wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated in favor of the improved WordPress Plugin documents-from-git

WordPress Plugin to use as collaboration and version control platform for Markdown documents.

Advantages:

  • Easy to update by external users via pull requests, minimizes the chance of stale tutorials
  • Write Markdown in your favorite editor and just push to your repo to update your blog

It features the following shortcodes:

  1. [md_ token=YourToken url= URL]: Pulls raw HTML from the https://api..com/repos/ endpoint and styles it with markdown CSS
  2. [checkout_ token=YourToken url= URL]: Displays a formatted link to the repo with the date of the latest update
  3. [history_ token=YourToken url= URL]: Displays a commit history of the last 5 commits.
  4. [md_dashedbox_ token=YourToken url= URL]: Displays markdown file similar to nbconvert. This shortcode is mutually exclusive with md_ and checkout_.

API is queried on every new load of the page, so that changes in the repository will immediately be reflected on your blog. Private authentication tokens help increasing the API limit to 5000 requests per hour (enough even for Digital Ocean blogs) and accessing private repositories.

Idea and most of the code is based on Andy Challis' WP plugin to display Jupyter notebooks https://.com/ghandic/nbconvert. The CSS is taken from https://.com/sindresorhus/-markdown-css.

Usage

All shortcodes take token and url as attribute. token is your private personal access token, which you can generate here. url is the full URL to your document on . E.g.

[md_ token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]

[checkout_ token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]

[history_ token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]

[md_dashedbox_ token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]

Demo

Check it out on of our blogs:

https://gis-ops.com/react-redux-leaflet-turfjs-building-a-density-based-clustering-dbscan-app-with-the-almighty-here-maps-places-api/

https://www.beyond-storage.com/wordpress-plugin--markdown

Wordpress versions

Min: v4.0

Tested up to: 5.0.2

Contributors

About

➿ WordPress plugin to add markdown content from to a WP blog; based on https://.com/ghandic/nbconvert

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published