forked from liferay/liferay-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
96 lines (78 loc) · 3.54 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Documentation Repository Contents
=================================
This repository is intended for storage of Liferay product documentation.
Documents are to be comprised of chapter source files in Markdown format.
Images referenced in the documents are to be stored in the appropriate images
directories. Document sources are stored in directories for their appropriate
language (e.g. 'en' for English).
Directory Structure
===================
liferay-docs/
|____ <document dir>/ (e.g. QuickstartGuide/, userGuide/, devGuide/, soffice/)
| |____ <language dir>/ (e.g. 'en' for English, 'es' for Spanish)
| | |
| | |____ chapters/
| | | |____ [0-9][0-9]-<chapter subject>.markdown
| | | (e.g. 01-intro.markdown)
| | |
| | |____ images/ (language specific versions of the default images)
| |
| |____ images/ (default images for the document)
| |____ build.xml
|
|____ code/ (code for custom ant tasks)
|____ lib/ (JARs for custom ant tasks)
|
|____ README
|____ build-common.xml
|____ build.properties
|____ liferay-book-template.ott
|____ liferay-book-template-tradepaperback.ott
Document Format Conversion
==========================
Documents can be converted from markdown to HTML, epub and ODT formats using ant
targets found in build-common.xml. Override default properties, found in
build.properties, by creating your own properties file
(e.g. build.<username>.properties) to specify your desired property values.
The conversion targets create a build directory (e.g. userGuide/build/) for the
current document. This directory receives the Markdown source file, the language
specific image files, and the converted document.
Required Software
-----------------
* Ant: Required for executing Ant targets. Download from ...
http://ant.apache.org/bindownload.cgi
* Pandoc: Used in our Ant targets for conversions from Markdown to various
formats. See installation instructions at ...
http://johnmacfarlane.net/pandoc/installing.html
Conversion Steps
----------------
1. Go to the directory of the document to be converted.
Example - userGuide,
cd liferay-docs/userGuide
2. Execute a conversion target to produce the desired format of the document.
Example - aggregate the chapters into a single Markdown file and convert to HTML,
ant markdown-to-html
Example - aggregate the chapters into a single Markdown file and convert to ODT,
ant markdown-to-odt
Example - convert a single Markdown chapter file (e.g. 01-intro.markdown) to HTML,
ant chapter-to-html -Dchapter=01-intro
List all of the ant targets by executing ...
ant -projecthelp
Note, the Windows specific versions of the targets end in "-win"
(e.g. markdown-to-html-win).
Override the language property (i.e. lang), specified in the build.properties,
by either passing the language value to ant (e.g. -Dlang=es) or by specifying
the language in a name/value pair (e.g. lang=es) in your
build.<user>.properties.
The conversion targets build the results to the respective build directory
liferay-docs/<doc.name>/build/<lang>/
Example - build directory for the userGuide in English,
liferay-docs/
|____ userGuide/
|____ build/
|____ en/
| |____ userGuide.html
| |____ userGuide.markdown
| |____ userGuide.odt
|
|____ images/ (language specific images)