46 lines
1.3 KiB
Markdown
46 lines
1.3 KiB
Markdown
# MDLinks #
|
|
|
|
MDLinks is a static HTML page with JS markdown parser. It creates a link portal page with the links in a markdown file.
|
|
|
|
[Demo site](http://imaging.ninja/demo/mdlinks)
|
|
|
|
## UI
|
|
|
|
* At the top there is a search bar. Enter values to filter out links not matching to keyword.
|
|
* Pressing key 's' focuses the search bar.
|
|
* Pressing key 'c' clears the search bar.
|
|
* Top right has a toggle button. Click it to convert all links to open in a new window/tab.
|
|
* Pressing key 'n' toggles
|
|
|
|
|
|
## 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.columns=[integer]; // Split heads to this many columns
|
|
* config.narrow=[integer]; // Create one column table on windows narrower than N pixels
|
|
* config.search=true; // Display link search bar
|
|
* config.favicon='path_to_favicon.ico';
|
|
|
|
## Markdown
|
|
|
|
Only 1st level heads and links are parsed. The rest are printed as is:
|
|
```
|
|
# header
|
|
|
|
[link name](link url)
|
|
|
|
```
|
|
|
|
## Static HTML builder
|
|
|
|
Sometimes the reloading of styles and links is hard due to caching.
|
|
You can create a fully static single HTML page with:
|
|
|
|
```
|
|
bash build_static.sh -l example_links.txt -c config.js -s style.css > templated.html
|
|
```
|