Quick start
This documentation provides a detailed description of the program's usage as well as the page content writing methods and tricks. However, such information is probably not necessary for just trying the program out. This section describes quick-start options.
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 recommended structure and with some sample content.
After the program is installed, create an empty directory where the writing project must be set up, then switch to it in the command line terminal and execute the quick start script. On Windows:
>cd C:\your\path\your_project
>%MD2HTML_HOME%\bin\new_project\new_project.bat
On Unix-like platforms:
$ cd /your/path/your_project
$ $MD2HTML_HOME/bin/new_project/new_project
Note
Here is a possible issue that may be encountered on Unix-like platforms.
All necessary project files will be created in the directory your_project. Now generate
the project by double-clicking the command script generate_doc_py.bat or
generate_doc_java.bat (or executing the corresponding scripts in the command line).
Open the generated file index.html in the your_project directory to see the content.
Note
The your_project directory should be empty before running the quick start script.
Here is an instruction for manually creating a very simple writing project. This guide is intended mostly to demonstrate the main application workflow using a very simple setup, but it may be used in real life if such primitive setup is really needed.
In the 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
},
"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>
A Markdown file, let's say example.txt, with a content like this:
[TOC]
--------------------------------------------------
# About this page
This page demonstrates very simple writing project.
# The page content
Demonstrated are:
- **bold** text decoration;
- *italic* text decoration;
- `code` text decoration;
- a list usage.
Run either generate_doc_py.bat or generate_doc_java.bat (or the corresponding scripts on
Linux). Alternatively, open the project's directory in the command line and run the scripts there.
The result file example.html will be generated.
The result HTML page in this simple example neither contains nor links 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.