some parsedown extensions for khcms-esque sites
Go to file
Robert Miles acabef963e Fork tildewiki into khcms-md 2019-08-25 09:18:10 +00:00
src Fork tildewiki into khcms-md 2019-08-25 09:18:10 +00:00
.gitignore init 2019-07-03 00:23:33 -04:00
README.md Fork tildewiki into khcms-md 2019-08-25 09:18:10 +00:00
composer.json Fork tildewiki into khcms-md 2019-08-25 09:18:10 +00:00
composer.lock init 2019-07-03 00:23:33 -04:00

README.md

khcms-md

this is a fork of tildewiki made for khcms. specifically, it removes the font awesome/fork awesome dependency by removing the automated header links (which, while awesome for a wiki, doesn't translate as well to website pages).

credit to ben for the code (since he wrote it and I just removed some lines).

basic usage

you should just be able to use khcms. however, if you want to use this outside of the khcms project, you can follow these instructions:

  1. add khcms-md as a vcs repository in composer.json
"repositories": [
	{
		"type": "vcs",
		"url": "https://tildegit.org/khuxkm/khcms-md"
	}
]
  1. require khuxkm/khcms-md in composer.json
"require": {
	"khuxkm/khcms-md": "dev-master"
}
  1. get an instance
$parser = Khuxkm\KHCMSMD\Parser::factory();
  1. parse stuff
$parsed = $parser->parse(file_get_contents("my.md"));
echo $parsed->getContent();
  1. get yaml frontmatter values
echo $parsed->getYAML()["my_yaml_key"];