-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from neatc0der/release/v2.2.0
Release/v2.2.0
- Loading branch information
Showing
10 changed files
with
63 additions
and
32 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
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ This is a plugin and an extension for [mkdocs](https://github.com/mkdocs/mkdocs/ | |
|
||
This plugin was tested with, but is not limited to: | ||
|
||
* Python 3.8 | ||
* Python 3.9 | ||
* mkdocs 1.1 | ||
|
||
## Quickstart | ||
|
@@ -73,7 +73,7 @@ plugins: | |
encoding: utf-8 | ||
file_extension: .mm.md | ||
d3_version: 6.7.0 | ||
lib_version: 0.11.5 | ||
lib_version: 0.11.6 | ||
view_version: 0.2.6 | ||
``` | ||
|
@@ -82,7 +82,7 @@ In addition, feel free to define your favourite source urls like this: | |
```yaml | ||
extra_javascript: | ||
- https://unpkg.com/[email protected]/dist/d3.min.js | ||
- https://unpkg.com/[email protected].5/dist/browser/index.min.js | ||
- https://unpkg.com/[email protected].6/dist/browser/index.min.js | ||
- https://unpkg.com/[email protected]/dist/index.min.js | ||
``` | ||
|
@@ -92,6 +92,15 @@ extra_javascript: | |
* `markmap-lib` | ||
* `markmap-view` | ||
## Troubleshooting | ||
### Nav tree lists markmaps | ||
1. Move your markmap files to a separate folder next to `docs`, e.g. `mindmaps` | ||
2. Configure `base_path` accordingly (see [Advanced Settings](#advanced-settings)) | ||
## Credits :clap: | ||
Some of the development approaches are based on implementations provided by the following projects: | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# v2.2.0 | ||
|
||
* Adds [support for mkdocs-encryptcontent-plugin](https://github.com/neatc0der/mkdocs-markmap/issues/26) | ||
* Adds troubleshooting for [nav tree lists markmap files](https://github.com/neatc0der/mkdocs-markmap/issues/33) | ||
* Fixes distribute workflow |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
PACKAGE_NAME = 'mkdocs_markmap' | ||
PROJECT_NAME = PACKAGE_NAME.replace('_', '-') | ||
PROJECT_VERSION = '2.1.3' | ||
PROJECT_VERSION = '2.2.0' | ||
|
||
OWNER = 'neatc0der' | ||
REPOSITORY_NAME = f'{OWNER}/{PROJECT_NAME}' |
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 |
---|---|---|
@@ -1,19 +1,33 @@ | ||
(function initializeMarkmap() { | ||
const markmap_transformer = new markmap.Transformer(); | ||
const markmaps = document.getElementsByClassName('mkdocs-markmap'); | ||
var el, content, svg, root, m; | ||
for (var i = 0; i < markmaps.length; i++) { | ||
el = markmaps[i]; | ||
content = el.getAttribute('data-markdown').replaceAll(' ', '\n'); | ||
svg = el.querySelector('svg'); | ||
root = markmap_transformer.transform(content).root; | ||
m = markmap.Markmap.create(svg, null, root); | ||
function update_markmaps() { | ||
const markmap_transformer = new markmap.Transformer(); | ||
const markmaps = document.getElementsByClassName('mkdocs-markmap'); | ||
var el, content, svg, root, m; | ||
for (var i = 0; i < markmaps.length; i++) { | ||
el = markmaps[i]; | ||
content = el.getAttribute('data-markdown').replaceAll(' ', '\n'); | ||
svg = el.querySelector('svg'); | ||
root = markmap_transformer.transform(content).root; | ||
m = markmap.Markmap.create(svg, null, root); | ||
|
||
(function(obj, e, r) { | ||
obj.rescale(1).then(function() { | ||
e.parentElement.style.height = (e.getBBox().height + 10) + "px"; | ||
requestAnimationFrame(() => { obj.fit(); }) | ||
}); | ||
})(m, svg, root); | ||
(function(obj, e, r) { | ||
obj.rescale(1).then(function() { | ||
e.parentElement.style.height = (e.getBBox().height + 10) + "px"; | ||
requestAnimationFrame(() => { obj.fit(); }) | ||
}); | ||
})(m, svg, root); | ||
} | ||
} | ||
|
||
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; | ||
var observer = new MutationObserver(function(mutations) { | ||
update_markmaps(); | ||
}); | ||
|
||
var target = document.getElementById('mkdocs-decrypted-content'); | ||
if (undefined != target) { | ||
observer.observe(target, { childList: true }); | ||
} | ||
|
||
update_markmaps(); | ||
})(); |
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