khcms-md/README.md

1.1 KiB

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"];