Extension to Sailor that allows to read a markdown file and include on a view.
luarocks install sailor-md
<?lua
local md = require "sailor.md"
md.include("views/docs/my_file.md") -- or page:include_md("views/docs/my_file.md")
?>
MIT
Extension to Sailor that allows to read a markdown file and include on a view
License: MIT License
Extension to Sailor that allows to read a markdown file and include on a view.
luarocks install sailor-md
<?lua
local md = require "sailor.md"
md.include("views/docs/my_file.md") -- or page:include_md("views/docs/my_file.md")
?>
MIT
I'm not sure if it's a requirement of translating Markdown to HTML, but it's certainly common to turn header values into slugs and add them as ids to an element that wraps the header in the HTML. This then enables direct linking to sections within the page.
For example:
https://github.com/sailorproject/sailor-md#usage-example-in-a-view-of-a-sailor-application
Seems like the tag v0.1 is deatached, I get this "note" when I install sailor-md:
$ luarocks install sailor-md
Warning: falling back to curl - install luasec to get native HTTPS support
Installing https://luarocks.org/sailor-md-0.1-1.rockspec...
Using https://luarocks.org/sailor-md-0.1-1.rockspec... switching to 'build' mode
Cloning into 'sailor-md'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (6/6), done.
Checking connectivity... done.
Note: checking out '9fc968debc3d026278a6a721404e14e59b30c82a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
Updating manifest for /Users/xspager/.lua/52/lib/luarocks/rocks
sailor-md 0.1-1 is now built and installed in /Users/xspager/.lua/52 (license: MIT)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.