Skip to content

Commit

Permalink
Merge branch 'release/v5.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
manuth committed Oct 4, 2021
2 parents 0efcf65 + b14e224 commit 18990d2
Show file tree
Hide file tree
Showing 42 changed files with 1,455 additions and 472 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ steps:
ACCESS_TOKEN:
from_secret: ovsx_token
commands:
- npx ovsx publish --pat $ACCESS_TOKEN || true
- npx ovsx publish --pat $ACCESS_TOKEN
when:
event:
- tag
Expand All @@ -57,7 +57,7 @@ steps:
ACCESS_TOKEN:
from_secret: azure_token
commands:
- npx vsce publish --pat $ACCESS_TOKEN || true
- npx vsce publish --pat $ACCESS_TOKEN
when:
event:
- tag
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## MarkdownConverter [Unreleased]

[Show differences](https://github.com/manuth/MarkdownConverter/compare/v4.0.3...dev)
[Show differences](https://github.com/manuth/MarkdownConverter/compare/v5.0.0...dev)

## MarkdownConverter v5.0.0
### Breaking
- Renamed a few settings
Have a look at this table to see what the new settings are called like now:
| Old Name | New Name |
| ------------------------------------------------------- | ---------------------------------------------- |
| `markdownConverter.Document.Design.Template` | `markdownConverter.Document.Template` |
| `markdownConverter.Document.Design.DefaultStyles` | `markdownConverter.Document.DefaultStyles` |
| `markdownConverter.Document.Design.HighlightStyle` | `markdownConverter.Document.HighlightStyle` |
| `markdownConverter.Document.Design.StyleSheetInsertion` | `markdownConverter.Assets.StyleSheetInsertion` |
| `markdownConverter.Document.Design.StyleSheets` | `markdownConverter.Assets.StyleSheets` |
| `markdownConverter.Document.Design.ScriptInsertion` | `markdownConverter.Assets.ScriptInsertion` |
| `markdownConverter.Document.Design.Scripts` | `markdownConverter.Assets.Scripts` |
Sorry for the inconvenience - I just really wanted the `Design`-category to go away.

### Fixed
- Broken webpack settings
- Broken permalink-creator for anchors and the infamous table of contents creator
- Vulnerabilities in dependencies

### Added
- Added support for inserting pictures using Base64-encoding - a huge thanks to @Postur for helping me implementing this feature!
Use the `markdownConverter.Assets.PictureInsertion` to control whether to insert pictures in `<img>`-tags based on their paths. This works for the document's body as well as running blocks (the header and the footer)

### Updated
- All dependencies

[Show differences](https://github.com/manuth/MarkdownConverter/compare/v4.0.3...v5.0.0)

## MarkdownConverter v4.0.3
### Fixed
Expand Down
43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`?
Expand Down Expand Up @@ -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.
Expand All @@ -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.

Expand All @@ -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"
Expand All @@ -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.

Expand Down Expand Up @@ -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 -->
Expand Down
Loading

0 comments on commit 18990d2

Please sign in to comment.