Quick start
The documentation gives the program's usage detailed description as well as the page content writing methods and tricks. But such information is probably not necessary for just trying the program out. This section describes the ways of quick starting.
Note
Before following this section, the program must be installed, see the Installation section.
The quick-start script creates a small new project with a typical structure and with some sample content.
Note
As for now, the quick start script is implemented for Windows only.
After the program is installed, create an empty directory where the documentation must be set up, then switch to there in the command line terminal:
>cd C:\your\path\your_project
Execute the following command:
>%MD2HTML_HOME%\bin\new_project\new_project.bat
All necessary project files will be created in the directory your_project
. Just generate
the documentation by double-clicking the command file generate_doc_py.bat
or
generate_doc_java.bat
. Open the generated file readme.html
in the your_project
directory to see the content.
Note
The your_project
directory must better be empty before running the new project generation
script.
Here is an instruction for manually creating a very simple documentation project.
In a project directory create the following artifacts.
File generate_doc_py.bat
or generate_doc_java.bat
. May be copied from the program's root
directory. There are corresponding generate_doc_py
or generate_doc_java
scripts for Linux.
Argument file md2html_args.json
with a content like this:
{
"options": {
"verbose": true
},
"default": {
"template": "template.html",
"no-css": true,
"verbose": true
},
"documents": [
{ "input": "example.txt", "title": "Example" }
]
}
Template file template.html
with a content like this:
<!DOCTYPE html>
<html style="font-size: 20px;">
<head>
<title>{{title}}</title>
<meta charset="utf-8">
</head>
<body>
{{{content}}}
</body>
</html>
Example Markdown file example.txt
with a content like this:
[TOC]
--------------------------------------------------
# About this page
This page demonstrates a simplest possible documentation.
# Formatting and lists
Demonstrated are:
- **bold** text decoration;
- *italic* text decoration;
- `code` text decoration;
- a list usage.
Click ether of the files generate_doc_py.bat
or generate_doc_java.bat
(or corresponding
files for Linux). Alternatively the project's directory may be opened in the command line and
the scripts may be run in there. The result file example.html
will be generated.
The result HTML page in this simple example doesn't contain nor link any style sheets and uses the browser's default styles.
The described example is reproduced in the directory simplest_project
and the generated page
may be viewed here.