-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,455 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,10 @@ A markdown-converter for [vscode][vscode] | |
- [Headers and Footers](#headers-and-footers) | ||
- [Including Table of Contents](#including-table-of-contents) | ||
- [Third Party Markdown Extensions](#third-party-markdown-extensions) | ||
- [CSS and JavaScript Assets](#css-and-javascript-assets) | ||
- [Insertion](#insertion) | ||
- [Assets](#assets) | ||
- [CSS- and JavaScript-Files](#css--and-javascript-files) | ||
- [Insertion](#insertion) | ||
- [Pictures](#pictures) | ||
- [Settings](#settings) | ||
|
||
## What is `MarkdownConverter`? | ||
|
@@ -167,7 +169,7 @@ Header: | |
This is a test. | ||
``` | ||
|
||
If you'd like to have more control on how your headers and footers look like, you might want to adjust the `markdownConverter.Document.HeaderTemplate` and `markdownConverter.Document.FooterTemplate` options. | ||
If you'd like to have more control on what your headers and footers look like, you might want to adjust the `markdownConverter.Document.HeaderTemplate` and `markdownConverter.Document.FooterTemplate` options. | ||
|
||
## Including Table of Contents | ||
The `MarkdownConverter` provides the functionality to create a table of contents at runtime. | ||
|
@@ -192,10 +194,11 @@ Furthermore, the `markdownConverter.Parser.Toc.Levels` allows you to choose whic | |
## Third Party Markdown Extensions | ||
If you want to use third party markdown-extensions in your documents (such as the [Markdown Preview Mermaid Support], [Markdown Footnote] or [Markdown Emoji]), you might want to install the extensions of your choice and enable the `markdownConverter.Parser.SystemParserEnabled` setting which makes `MarkdownConverter` use VSCode's built-in `markdown-it` parser with all markdown extensions enabled. | ||
|
||
## CSS and JavaScript Assets | ||
## Assets | ||
### CSS- and JavaScript-Files | ||
`MarkdownConverter` allows you to pass stylesheets and JavaScript-files which are added to the document. | ||
|
||
Use the `markdownConverter.Document.Design.StyleSheets` and the `markdownConverter.Document.Design.Scripts` options for adding stylesheets and scripts. | ||
Use the `markdownConverter.Assets.StyleSheets` and the `markdownConverter.Assets.Scripts` options for adding stylesheets and scripts. | ||
|
||
You can choose the way to insert the stylesheet or script for each asset individually. | ||
|
||
|
@@ -205,31 +208,31 @@ You can choose the way to insert the stylesheet or script for each asset individ | |
|
||
```json | ||
{ | ||
"markdownConverter.Document.Design.StyleSheets": { | ||
"markdownConverter.Assets.StyleSheets": { | ||
"./css/styles.css": "Default", | ||
"/home/scott/styles.css": "Link", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css": "Include" | ||
}, | ||
"markdownConverter.Document.Design.Scripts": { | ||
"markdownConverter.Assets.Scripts": { | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js": "Default" | ||
} | ||
} | ||
``` | ||
|
||
### Insertion | ||
#### Insertion | ||
Basically, there are two ways on how to add an asset to the document. | ||
You can either add a link to the asset or have its content copied to the document. | ||
|
||
You can choose how to treat assets by default based on their paths using the `markdownConverter.Document.Design.StyleInsertion` and the `markdownConverter.Document.Design.ScriptInsertion` options. | ||
You can choose how to treat assets by default based on their paths using the `markdownConverter.Assets.StyleInsertion` and the `markdownConverter.Assets.ScriptInsertion` options. | ||
|
||
```json | ||
{ | ||
"markdownConverter.Document.Design.StyleInsertion": { | ||
"markdownConverter.Assets.StyleInsertion": { | ||
"Link": "Link", | ||
"AbsolutePath": "Link", | ||
"RelativePath": "Include" | ||
}, | ||
"markdownConverter.Document.Design.ScriptInsertion": { | ||
"markdownConverter.Assets.ScriptInsertion": { | ||
"Link": "Include", | ||
"AbsolutePath": "Include", | ||
"RelativePath": "Default" | ||
|
@@ -239,6 +242,20 @@ You can choose how to treat assets by default based on their paths using the `ma | |
|
||
By default, `MarkdownConverter` will include assets located at absolute and relative paths and add links to assets located at URLs. | ||
|
||
### Pictures | ||
You might want to have pictures in `<img>`-tags included directly in your document using Base64-encoding. | ||
The `markdownConverter.Assets.PictureInsertion`-option allows you to set whether to include pictures based on the nature of their paths: | ||
|
||
```json | ||
{ | ||
"markdownConverter.Assets.PictureInsertion": { | ||
"Link": "Include", | ||
"AbsolutePath": "Include", | ||
"RelativePath": "Include" | ||
} | ||
} | ||
``` | ||
|
||
## Settings | ||
This is a list of the most important settings. To see all of them, install the extension and have a look into the settings-dialogue of vscode. | ||
|
||
|
@@ -271,9 +288,9 @@ This is a list of the most important settings. To see all of them, install the e | |
Allows you to set the content of the different sections of the header and the footer. | ||
- `markdownConverter.Document.HeaderTemplate` and `markdownConverter.Document.FooterTemplate`: | ||
The html-sourcecode of the header and footer. Variable-substituion is supported here as well. Page-numbers and similar information can be included as described in the [puppeteer docs](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions). | ||
- `markdownConverter.Document.Design.DefaultStyles`: | ||
- `markdownConverter.Document.DefaultStyles`: | ||
Allows you to disable the default styles. This might be useful if you want to create your own stylesheet from scratch. | ||
- `markdownConverter.Document.Design.StyleSheets`: | ||
- `markdownConverter.Assets.StyleSheets`: | ||
A set of stylesheets to include in your document. | ||
|
||
<!--- References --> | ||
|
Oops, something went wrong.