Skip to content

Commit 069c36a

Browse files
committed
Update readme.md
1 parent c3d37a2 commit 069c36a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

readme.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Looking for something to generate a blog from Markdown files? Check out [ghost-r
66

77
## Features
88

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.
1010
- `v2.2` added Windows support (!)
1111
- Includes 15+ ready-made CSS stylesheets for Markdown, see the bottom of the readme for screenshots.
1212
- 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
1515

1616
### Layout features
1717

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.
2223

23-
## Features for creating your own layout
24+
### Features for creating your own layout
2425

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.
2627
- Create your own layout based on an existing layout via `--layout` with:
2728
- Full [Handlebars](http://handlebarsjs.com/) support for layouts, helpers and partials
2829
- 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
5657
- `--output <path>` specifies the output directory (default: `./output/`).
5758
- `--layout <path>` specifies the layout. It can be:
5859
- 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`).
6061
- A layout folder consists of:
6162
- `./page.html`, the template to use in the layout
6263
- `./assets`, the assets folder to copy over to the output
6364
- `./partials`, the [partials](#partials) directory
6465
- `./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.
6666
- `--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`.
6767
- `--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.
6868
- `--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
7171

7272
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.
7373

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+
7476
## Syntax highlighting
7577

7678
`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

Comments
 (0)