initial
This commit is contained in:
45
README.md
Normal file
45
README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# MDSnippets #
|
||||
|
||||
MDSnippets is a static HTML page with JS markdown parser to create a
|
||||
generic snippet storage
|
||||
|
||||
Snippets are syntax highlighted with [highlight.js](https://highlightjs.org).
|
||||
See their documentation for language names.
|
||||
|
||||
## UI
|
||||
|
||||
* At the top there is a search bar. Enter values to filter snippet names.
|
||||
* Pressing key 's' or / focuses the search bar.
|
||||
|
||||
## Configuration
|
||||
|
||||
* config.js
|
||||
* File is read to replace values in "config.xx" object.
|
||||
* config.source='path_to_markdown.txt';
|
||||
* config.style='path_to_style.css';
|
||||
* config.title='Title of page';
|
||||
* config.search=true; // Display link search bar
|
||||
* config.favicon='path_to_favicon.ico';
|
||||
|
||||
## Markdown
|
||||
|
||||
Only 1st level heads, names and code blocks are parsed:
|
||||
```
|
||||
# header
|
||||
|
||||
name
|
||||
\`\`\`python
|
||||
print("Hello World!")
|
||||
# Dot escape the ticks in real config.
|
||||
\`\`\`
|
||||
|
||||
```
|
||||
|
||||
## Static HTML builder
|
||||
|
||||
Sometimes the reloading of styles and links is hard due to caching.
|
||||
You can create a static single HTML page with:
|
||||
|
||||
```
|
||||
bash build_static.sh -l example_snippets.txt -c config.js -s style.css > templated.html
|
||||
```
|
||||
Reference in New Issue
Block a user