Adding Pages
User Guide → Adding PagesIt is easy to add files to a MarkBind site as any file inside the becomes a part of the generated website.
This includes any static assets such as images and other media files.
Example If you have an image images/logo.png
in your root directory, it will be available as <website-url>/images/logo.png
in the generated website.
Example If you have a file tutorial/code.txt
in your root directory, it will be available as <website-url>/tutorial/code.txt
in the generated website.
You can specify which files to be omitted from the site by using the ignore
field in the site.config
file as explained here.
More importantly, .md
files can be transformed into HTML pages with matching names.
Example <root>/tutorial/
setup.md
can be transformed into <website-url>/tutorial/
setup.html
Here are the steps to add a new page to your site:
.md
file anywhere inside the root directory.pages
attribute of the site.json
to cover the new file, if necessary.You can easily include and deploy any external , along with your MarkBind site.
Example Your code coverage tool generates a HTML Coverage Report into a coverage
folder and you want it to be accessible at <website-url>/coverage/index.html
The general approach is as follows:
pagesExclude
attribute of the site.json
file.markbind build
to generate your MarkBind site.In the event that you only generate the static webpages in your CI build process, you may receive an invalid intra-link warning if you serve the MarkBind site locally. To disable it on a per-link basis, add {no-validation}
at the end like this:
This is [my cool page generated from another tool](/my-cool-page/index.html{no-validation})
See the link Validation section for more details.