Skip to content

Commit

Permalink
v1.1.0 (#25)
Browse files Browse the repository at this point in the history
* Code updates and new functionality added
* Removal of python-frontmatter
* Importlib deprecation removal
* Debugger documentation added

---------

Co-authored-by: Maciej Kusz <9740637+mkusz@users.noreplay.github.com>
  • Loading branch information
mkusz and Maciej Kusz committed Sep 1, 2023
1 parent 8cf3252 commit a25d1ec
Show file tree
Hide file tree
Showing 253 changed files with 43,598 additions and 10,358 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
.venv
__pycache__
.idea
.env
dist
*_mkdocs_build.log
*_mkdocs_debug.zip
*/.obsidian/plugins/obsidian-languagetool-plugin
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ repos:
# files: (?<!\.min)\.css$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-json
- id: end-of-file-fixer
exclude: ^(docs|mkdocs_publisher_docs/.obsidian)/
- id: trailing-whitespace
exclude: ^(docs|mkdocs_publisher_docs/.obsidian)/
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-json
- id: check-toml
- id: detect-private-key
- id: no-commit-to-branch
Expand Down
67 changes: 27 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,51 @@
---
date: 2023-02-28 12:30:18
update: 2023-06-12 23:52:23
---
# Publisher plugin for MkDocs
# Publisher for MkDocs

[![PyPI version](https://img.shields.io/pypi/v/mkdocs-publisher?logo=pypi&style=plastic)](https://pypi.org/project/mkdocs-publisher/)
[![License type](https://img.shields.io/pypi/l/mkdocs-publisher?logo=pypi&style=plastic)](https://opensource.org/license/mit/)
[![PyPI Downloads last month](https://img.shields.io/pypi/dm/mkdocs-publisher?logo=pypi&style=plastic)](https://pypistats.org/search/mkdocs-publisher)
[![Python versions](https://img.shields.io/pypi/pyversions/mkdocs-publisher?logo=python&style=plastic)](https://www.python.org)
[![GitHub last commit](https://img.shields.io/github/last-commit/mkusz/mkdocs-publisher?logo=github&style=plastic)](https://github.com/mkusz/mkdocs-publisher/commits/main)

Publishing platform plugins for [MkDocs](https://www.mkdocs.org/) that include:
Publisher for [MkDocs](https://www.mkdocs.org/) is a set of plugins that helps with content creation and publication.

- `pub-blog` – adds blogging capability,
- `pub-social` – creates social cards for social media sharing using document metadata,
- `pub-obsidian` - bindings for [Obsidina.md](https://obsidian.md) that allows you to use:
- wikilinks,
- backlinks,
- callouts,
- vega-charts (plugin),
- `pub-minifier` – file size optimization (good for SEO and overall page size optimization),
- `pub-meta` - support for documentation metadata (slug, dates, publication status, directories publication status, automatic navigation building, etc.).
## Features

- [pub-meta](https://mkusz.github.io/mkdocs-publisher/setup/general/pub-meta/) – support for:
- automatic [document navigation](https://www.mkdocs.org/user-guide/configuration/#nav) creation based on file names order,
- document publication status,
- possibility to define document and directories URL (good for SEO),
- document creation and update date (good for SEO),
- [pub-blog](https://mkusz.github.io/mkdocs-publisher/setup/general/pub-blog/) – blogging capability:
- index creation,
- support for blog post teasers,
- automatic creation of pages for archive, categories and tags,
- [pub-obsidian](https://mkusz.github.io/mkdocs-publisher/setup/general/pub-obsidian/) – bindings for [Obsidina.md](https://obsidian.md) that allows you to use:
- [backlinks](https://help.obsidian.md/Plugins/Backlinks),
- [callouts](https://help.obsidian.md/Editing+and+formatting/Callouts),
- [wikilinks](https://help.obsidian.md/Linking+notes+and+files/Internal+links),
- [vega charts](https://vega.github.io/vega/) (using [Vega Visualization Plugin for Obsidian](https://github.com/Some-Regular-Person/obsidian-vega)) - advanced solution for creating charts,
- [pub-social](https://mkusz.github.io/mkdocs-publisher/setup/seo-and-sharing/pub-social/) – social cards for social media sharing using document metadata,
- [pub-minifier](https://mkusz.github.io/mkdocs-publisher/setup/seo-and-sharing/pub-minifier/) – file size optimization (good for SEO and overall page size optimization),
- [pub-debugger](https://mkusz.github.io/mkdocs-publisher/setup/development/pub-debugger/) – logging on steroids with the possibility of creating of ZIP file with logs and additional information (can be used for better issue reporting).

## Installation

```commandline
pip install mkdocs-publisher
```

## Basic usage

> **Note**
> As a base for any development, [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) theme was used. If you are willing to use any other theme, you may (or may not) face some issues. If this happens, please submit an [issue](https://github.com/mkusz/mkdocs-publisher/issues).
More information about installation methods and plugin setup can be found on this [documentation page](https://mkusz.github.io/mkdocs-publisher/setup/installation/).

> **Warning**
> Consider this plugin as a beta, so before any use make sure you have a backup of your data.
If you have found any issue, have an idea for a feature, please submit an issue.
> Before any use make sure you have a backup of your data.
## Features

List of included features (more documentation is needed):

- automatic blog post index page generation with blog post teasers based on delimiter inside a blog post and own template (delimiter can be changed in plugin config in `mkdocs.yaml`),
- blog post/page update date based on blog post metadata,
- separate directory for blog post documents with auto-generated separate navigation (blog posts are sorted from newest to oldest based on blog post metadata),
- home page set to blog post index with possibility to rename,
- auto-adding link to full blog post from blog post index file (under each post that has teaser delimiter, if delimiter is not present, then full post is inside post index file, but is preserved in blog post navigation and site map),
- added sub-pages for blog posts: archive, categories, tags,
- minification plugin for graphics and documentation files,
- social cards metadata injection based on document metadata (no need to edit any template).

## How To

More detailed information on how to set up, configure and write a blog posts and/or documentation can be found in [documentation](https://mkusz.github.io/mkdocs-publisher/) .
> **Note**
> As a base for any development, [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) theme was used. If you are willing to use any other theme, you may (or may not) face some issues. If this happens, please submit an [issue](https://github.com/mkusz/mkdocs-publisher/issues).
## Planned features

A full list of planned developments can be found on [this documentation page](https://mkusz.github.io/mkdocs-publisher/development/backlog/). I'm planning to move it to the project [GitHub issues](https://github.com/mkusz/mkdocs-publisher/issues) with proper badges and longer descriptions, but it's time-consuming and at this stage I'd rather spend it to develop a project.
A full list of planned developments can be found on [this documentation page](https://mkusz.github.io/mkdocs-publisher/development/other/backlog/). I'm planning to move it to the project [GitHub issues](https://github.com/mkusz/mkdocs-publisher/issues) with proper badges and longer descriptions, but it's time-consuming and at this stage I'd rather spend it to develop a project.

## Version history

This section becomes too big and hard to navigate. Also it's harder to maintain the same changelog in 2 places. The entire version history can be found in the project [version history](https://mkusz.github.io/mkdocs-publisher/development/changelog/) document and on inside project [GitHub releases](https://github.com/mkusz/mkdocs-publisher/releases).
The entire version history can be found in the project [version history](https://mkusz.github.io/mkdocs-publisher/development/changelog/) document and inside [releases](https://github.com/mkusz/mkdocs-publisher/releases).
113 changes: 59 additions & 54 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<meta content="Publishing plugin for MkDocs" name="description">
<meta content="Maciej 'maQ' Kusz" name="author">
<link href="/mkdocs-publisher/publisher_icon.png" rel="icon">
<meta content="mkdocs-1.4.3, mkdocs-material-9.1.14" name="generator">
<title>MkDocs Publisher</title>
<link href="/mkdocs-publisher/assets/stylesheets/main.85bb2934.min.css" rel="stylesheet">
<link href="/mkdocs-publisher/assets/stylesheets/palette.a6bdf11c.min.css" rel="stylesheet">
<meta content="mkdocs-1.5.2, mkdocs-material-9.1.21" name="generator">
<title>Publisher for MkDocs</title>
<link href="/mkdocs-publisher/assets/stylesheets/main.eebd395e.min.css" rel="stylesheet">
<link href="/mkdocs-publisher/assets/stylesheets/palette.ecc896b0.min.css" rel="stylesheet">
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback" rel="stylesheet">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link href="/mkdocs-publisher/assets/stylesheets/publisher.min.css" rel="stylesheet">
<link href="/mkdocs-publisher/assets/stylesheets/publisher.css" rel="stylesheet">
<link href="/mkdocs-publisher/assets/stylesheets/blog.min.css" rel="stylesheet">
<link href="/mkdocs-publisher/assets/stylesheets/obsidian.min.css" rel="stylesheet">
<script>__md_scope=new URL("/mkdocs-publisher/",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
Expand All @@ -28,9 +28,9 @@
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--lifted md-header--shadow" data-md-component="header">
<header class="md-header" data-md-component="header">
<nav class="md-grid md-header__inner" aria-label="Header">
<a href="https://mkusz.github.io/mkdocs-publisher" class="md-header__button md-logo" data-md-component="logo" title="MkDocs Publisher" aria-label="MkDocs Publisher">
<a href="https://mkusz.github.io/mkdocs-publisher" class="md-header__button md-logo" data-md-component="logo" title="Publisher for MkDocs" aria-label="Publisher for MkDocs">
<img alt="logo" src="/mkdocs-publisher/publisher_logo.png">
</a>
<label class="md-icon md-header__button" for="__drawer">
Expand All @@ -40,7 +40,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
MkDocs Publisher
Publisher for MkDocs
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
Expand Down Expand Up @@ -99,11 +99,13 @@
<svg viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
GitHub
mkusz/mkdocs-publisher
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
Expand Down Expand Up @@ -135,27 +137,25 @@
</ul>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-grid md-main__inner">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--lifted md-nav--primary" data-md-level="0" aria-label="Navigation">
<label class="md-nav__title" for="__drawer">
<a href="https://mkusz.github.io/mkdocs-publisher" class="md-logo md-nav__button" data-md-component="logo" title="MkDocs Publisher" aria-label="MkDocs Publisher">
<a href="https://mkusz.github.io/mkdocs-publisher" class="md-logo md-nav__button" data-md-component="logo" title="Publisher for MkDocs" aria-label="Publisher for MkDocs">
<img alt="logo" src="/mkdocs-publisher/publisher_logo.png">
</a>
MkDocs Publisher
Publisher for MkDocs
</label>
<div class="md-nav__source">
<a href="https://github.com/mkusz/mkdocs-publisher" class="md-source" data-md-component="source" title="Go to repository">
<div class="md-icon md-source__icon">
<svg viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
GitHub
mkusz/mkdocs-publisher
</div>
</a>
</div>
Expand All @@ -182,34 +182,64 @@
Installation
</a>
</li>
<li class="md-nav__item md-nav__item--nested md-nav__item--section">
<input class="md-toggle md-nav__toggle" type="checkbox" id="__nav_2_2">
<label class="md-nav__link" for="__nav_2_2" id="__nav_2_2_label" tabindex="0">
General
<span class="md-icon md-nav__icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-expanded="false" aria-labelledby="__nav_2_2_label">
<label class="md-nav__title" for="__nav_2_2">
<span class="md-icon md-nav__icon"></span>
General
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="/mkdocs-publisher/setup/pub-meta/" class="md-nav__link">
<a href="/mkdocs-publisher/setup/general/pub-meta/" class="md-nav__link">
Setting up meta
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/setup/pub-social/" class="md-nav__link">
Setting up social cards
<a href="/mkdocs-publisher/setup/general/pub-blog/" class="md-nav__link">
Setting up a blog
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/setup/pub-blog/" class="md-nav__link">
Setting up a blog
<a href="/mkdocs-publisher/setup/general/pub-obsidian/" class="md-nav__link">
Setting up Obsidian
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested md-nav__item--section">
<input class="md-toggle md-nav__toggle" type="checkbox" id="__nav_2_3">
<label class="md-nav__link" for="__nav_2_3" id="__nav_2_3_label" tabindex="0">
SEO & Sharing
<span class="md-icon md-nav__icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-expanded="false" aria-labelledby="__nav_2_3_label">
<label class="md-nav__title" for="__nav_2_3">
<span class="md-icon md-nav__icon"></span>
SEO & Sharing
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="/mkdocs-publisher/setup/pub-obsidian/" class="md-nav__link">
Setting up Obsidian
<a href="/mkdocs-publisher/setup/seo-and-sharing/pub-social/" class="md-nav__link">
Setting up social cards
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/setup/pub-minifier/" class="md-nav__link">
<a href="/mkdocs-publisher/setup/seo-and-sharing/pub-minifier/" class="md-nav__link">
Setting up minifier
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" type="checkbox" id="__nav_3">
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
Expand Down Expand Up @@ -300,38 +330,13 @@
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v010/" class="md-nav__link">
v0.1.0
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v020/" class="md-nav__link">
v0.2.0
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v030/" class="md-nav__link">
v0.3.0
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v040/" class="md-nav__link">
v0.4.0
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v041/" class="md-nav__link">
v0.4.1
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v050/" class="md-nav__link">
v0.5.0
<a href="/mkdocs-publisher/blog/tags/v0x/" class="md-nav__link">
v0.x
</a>
</li>
<li class="md-nav__item">
<a href="/mkdocs-publisher/blog/tags/v100/" class="md-nav__link">
v1.0.0
<a href="/mkdocs-publisher/blog/tags/v1x/" class="md-nav__link">
v1.x
</a>
</li>
</ul>
Expand Down Expand Up @@ -434,8 +439,8 @@ <h1>404 - Not found</h1>
<div class="md-dialog" data-md-component="dialog">
<div class="md-typeset md-dialog__inner"></div>
</div>
<script id="__config" type="application/json">{"base": "/mkdocs-publisher/", "features": ["navigation.tabs", "navigation.tabs.sticky", "navigation.footer", "navigation.tracking", "navigation.top", "navigation.sections", "search.suggest", "search.highlight", "search.share", "content.action.edit", "content.action.view", "content.code.copy", "content.code.annotate", "content.tabs.link", "toc.follow"], "search": "/mkdocs-publisher/assets/javascripts/workers/search.208ed371.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="/mkdocs-publisher/assets/javascripts/bundle.b4d07000.min.js"></script>
<script id="__config" type="application/json">{"base": "/mkdocs-publisher/", "features": ["navigation.tabs", "navigation.footer", "navigation.tracking", "navigation.top", "navigation.sections", "navigation.instant", "search.suggest", "search.highlight", "search.share", "content.action.edit", "content.action.view", "content.code.copy", "content.code.annotate", "content.tabs.link", "toc.follow"], "search": "/mkdocs-publisher/assets/javascripts/workers/search.74e28a9f.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="/mkdocs-publisher/assets/javascripts/bundle.220ee61c.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
</body>
</html>
</html>
Binary file added docs/_attachments/debugger_console_example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a25d1ec

Please sign in to comment.