You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Looking for something to generate a blog from Markdown files? Check out [ghost-r
6
6
7
7
## Features
8
8
9
-
-`v2.3` adds one new feature: header hover anchor links. When you hover over a header, a hover anchor link appears to the side of the header. Clicking on that link or coyping its URL produces a link to that specific location on the page. All built-in layouts support this feature by default.
9
+
-`v2.3` adds one new feature: header hover anchor links. When you hover over a header, a hover anchor link appears to the side of the header. Clicking on that link or copying its URL produces a link to that specific location on the page. All built-in layouts support this feature by default.
10
10
-`v2.2` added Windows support (!)
11
11
- Includes 15+ ready-made CSS stylesheets for Markdown, see the bottom of the readme for screenshots.
12
12
- Reuse the stylesheets or use the `generate-md` tool to convert a folder of Markdown files to HTML using one of the built-in layouts or a custom layout.
@@ -15,14 +15,15 @@ Looking for something to generate a blog from Markdown files? Check out [ghost-r
15
15
16
16
### Layout features
17
17
18
-
- Built in support for code syntax highlighting via highlight.js
19
-
- All layouts now include a Github-style code highlighting theme by default (new v2.0!)
20
-
- Built in table of contents generation from Markdown headings, now fully customizable by replacing the `{{> toc}}` partial in custom layout .
21
-
- Automatically detects the document title from the first heading in the Markdown markup
18
+
- Built in support for code syntax highlighting via highlight.js; all layouts include a Github-style code highlighting theme by default.
19
+
- Built in table of contents generation from Markdown headings, fully customizable by replacing the `{{> toc}}` partial in custom layout.
20
+
- Built in header id and anchor generation for headings written in Markdown; all layouts support revealing the URL via header hover links.
21
+
- Support for custom logic for rendering code blocks via `--highlight-*`; this can be used to implement custom blocks that render the content of the code block in some interesting way.
22
+
- Automatically detects the document title from the first heading in the Markdown markup.
22
23
23
-
## Features for creating your own layout
24
+
###Features for creating your own layout
24
25
25
-
-Easier to get started with a custom layout via`--exports`, which exports a built in layout as a starting point for your custom layout.
26
+
-To make it easier to get started, you can export an existing layout using`--exports` and use that as a starting point for your layouts.
26
27
- Create your own layout based on an existing layout via `--layout` with:
27
28
- Full [Handlebars](http://handlebarsjs.com/) support for layouts, helpers and partials
28
29
- Fully customizable table of contents template via the `toc` partial
@@ -56,13 +57,12 @@ Try out different layouts by changing the `--layout` parameter; screenshots are
56
57
-`--output <path>` specifies the output directory (default: `./output/`).
57
58
-`--layout <path>` specifies the layout. It can be:
58
59
- The name of a builtin layout, such as `github` or `mixu-page`.
59
-
- A path to a layout folder (full path, or path relative to `process.cwd`).
60
+
- A path to a layout folder (full path, or a path relative to `process.cwd`).
60
61
- A layout folder consists of:
61
62
-`./page.html`, the template to use in the layout
62
63
-`./assets`, the assets folder to copy over to the output
63
64
-`./partials`, the [partials](#partials) directory
64
65
-`./helpers`, the [helpers](#helpers) directory
65
-
- Note that `--template`, `--asset-dir`, `--partials` and `--helpers` are deprecated. This simplifies the loading logic. You need to put each of those resources in the same layout folder.
66
66
-`--export <name>`: Exports a built-in layout to a directory. Use `--output <path>` to specify the location to write the built-in layout. For example, `--export github --output ./custom-layout` will copy the `github` builtin layout to `./custom-layout`.
67
67
-`--highlight-<language> <module>`: Specifies a custom highlighter module to use for a specific language. For example, `--highlight-csv mds-csv` will highlight any `csv` code blocks using the `mds-csv` module.
68
68
-`--no-header-links`: If this flag is passed, the HTML for header links will not be generated. The hover links are enabled by default.
@@ -71,6 +71,8 @@ Try out different layouts by changing the `--layout` parameter; screenshots are
71
71
72
72
The output HTML is fully static and uses relative paths to the asset files, which are also copied into the output folder. This means that you could, for example, point a HTTP server at the root of `./test/` and be done with it or push the output folder to Amazon S3.
73
73
74
+
For example, here is how I deploy one of my books: `aws s3 sync ./output/ s3://some-s3-bucket/some-folder/ --delete --exclude "node_modules/*" --exclude ".git"` (assuming credentials are in the necessary environment variables and that the AWS CLI is installed).
75
+
74
76
## Syntax highlighting
75
77
76
78
`v2.0` has syntax highlighting enabled by default. Every layout has also been updated to include a default [highlight.js](https://highlightjs.org/) syntax highlighting theme, which means everything works out of the box. For more highlighter themes, [check out this demo site](https://highlightjs.org/static/demo/) - you can find the [highlight.js CSS styles here](https://github.com/isagalaev/highlight.js/tree/master/src/styles).
0 commit comments