https://github.com/HeardACat/strapmarked
Generate beautiful HTML documents using pure markdown - all in a single file
https://github.com/HeardACat/strapmarked
Last synced: 10 months ago
JSON representation
Generate beautiful HTML documents using pure markdown - all in a single file
- Host: GitHub
- URL: https://github.com/HeardACat/strapmarked
- Owner: HeardACat
- Created: 2020-05-18T23:25:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-24T13:42:16.000Z (over 5 years ago)
- Last Synced: 2025-01-31T17:20:05.650Z (11 months ago)
- Language: HTML
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strapmarked
Okay, so [Strapdown](https://github.com/arturadib/strapdown) hasn't been updated in over 5 years, so its effectively dead (right?). In that case what are our options? Can we still generate beautiful documents by writing markdown directly in HTML?
Yes of course! The answer is actually fairly straightforward:
* Use [marked](https://github.com/markedjs/marked) to handle the markdown parsing
* Use any drop css framework for styling the page. You can [view a selection here](https://github.com/markedjs/marked).
What does this look like? The html page could be:
```
document.getElementById('content').innerHTML = marked(document.getElementById('marked').innerHTML);
document.getElementById('marked').style.display = 'none';
```
And that's it! with 8 lines of boilerplate code, you've essentially got your strapdown alternative!
* [Example file](https://github.com/chappers/strapmarked/blob/master/index.html)
* [Live demo](https://chappers.github.io/strapmarked/)
Credit to [Marked](https://github.com/markedjs/marked) for Markdown parser and [dohliam/dropin-minimal-css](https://github.com/dohliam/dropin-minimal-css) for the css picker.