Skip to content

Commit c9e1950

Browse files
authored
experimental: internal theme plugin (#82)
* initial markdown to html plugin based on byrnereese/mkdocs-markdown-filter * works * reorder to match squidfunk/mkdocs-material plugin setup
1 parent 9dc322a commit c9e1950

File tree

12 files changed

+112
-4
lines changed

12 files changed

+112
-4
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ tox: install-tox install-test-prereqs
7171
check-version-match:
7272
cat terminal/theme_version.html | grep -s --silent $(version)\"\>\$$ -o
7373

74+
install-from-dist: build-theme
75+
pip uninstall mkdocs-terminal
76+
pip install dist/*.tar.gz
77+
7478
#for developer use, assumes you have already installed prereqs
7579
quick-tests:
7680
flake8 --ignore E501 && \

NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ Terminal for MkDocs' Tile Grid relies on the *meta*[^mkdocs-page-meta] attribute
5050
### img tile
5151
`<div .*? <figure(.)[^>]*? <img(.)*`
5252

53+
54+
55+
[project.entry-points."mkdocs.plugins"]
56+
# markdown-filter = "mkdocs_markdown_filter.plugin:MarkdownFilterPlugin"

documentation/docs/about/debug.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
tiles:
3+
- caption: '*@petradr*'
4+
img_src: ../../../img/picsum/167_200x200.jpeg
5+
img_title: 'to Picsum homepage'
6+
img_alt: 'close up image of fallen leaves'
7+
link_href: https://picsum.photos/
8+
- caption: 'Marcin **C**zerwinski'
9+
img_src: ../../../img/picsum/127_200x200.jpeg
10+
img_title: 'to Picsum homepage'
11+
img_alt: 'close up image of green moss on a log'
12+
link_href: https://picsum.photos/
13+
- caption: 'Steve Richey'
14+
img_src: ../../../img/picsum/143_200x200.jpeg
15+
img_title: 'to Picsum homepage'
16+
img_alt: 'overhead image of fallen leaves'
17+
link_href: https://picsum.photos/
18+
---
19+
20+
# Debug Markdown Experiments

documentation/local.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ theme:
1515
static_templates:
1616
- 404.html
1717

18+
plugins:
19+
- git-revision-date
20+
- search
21+
1822
watch:
1923
- '../terminal'
2024
- './mkdocs.yml'

documentation/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ nav:
4949
- Typography: 'elements/typography.md'
5050
- Install: 'install.md'
5151
- Releases: 'releases.md'
52+
# - About:
53+
# - Debug: 'about/debug.md'
5254

5355
markdown_extensions:
5456
# Python Markdown

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mkdocs-terminal",
3-
"version": "3.1.2",
3+
"version": "3.2.0",
44
"description": "Terminal.css theme for MkDocs",
55
"keywords": [
66
"mkdocs",

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ classifiers = [
2828
Source = "https://github.com/ntno/mkdocs-terminal"
2929
Issues = "https://github.com/ntno/mkdocs-terminal/issues"
3030

31+
[project.entry-points."mkdocs.plugins"]
32+
"terminal/md-to-html" = "terminal.plugins.md_to_html.plugin:MarkdownToHtmlFilterPlugin"
33+
3134
[project.entry-points."mkdocs.themes"]
3235
terminal = "terminal"
3336

terminal/legal/legal.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[open-source-template](https://github.com/auth0/open-source-template/blob/master/LICENSE) by [@auth0](https://github.com/auth0)
1919

2020
[mkdocs/mkdocs](https://github.com/mkdocs/mkdocs/blob/master/LICENSE)
21-
```
21+
```text
2222
Copyright © 2014-present, Tom Christie. All rights reserved.
2323
2424
Redistribution and use in source and binary forms, with or
@@ -87,3 +87,24 @@ POSSIBILITY OF SUCH DAMAGE.
8787
```text
8888
Creative Commons ― CC BY 3.0
8989
```
90+
91+
[mkdocs-markdown-filter](https://github.com/byrnereese/mkdocs-markdown-filter/blob/master/LICENSE) by [Byrne Reese](https://github.com/byrnereese)
92+
```text
93+
Permission is hereby granted, free of charge, to any person obtaining a copy
94+
of this software and associated documentation files (the "Software"), to deal
95+
in the Software without restriction, including without limitation the rights
96+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97+
copies of the Software, and to permit persons to whom the Software is
98+
furnished to do so, subject to the following conditions:
99+
100+
The above copyright notice and this permission notice shall be included in all
101+
copies or substantial portions of the Software.
102+
103+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
105+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
106+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
107+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
108+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
109+
SOFTWARE.
110+
```

terminal/plugins/md_to_html/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)