Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Jun 27, 2023
1 parent 7f6bd7c commit b81197d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Expand Up @@ -10,6 +10,6 @@ sphinx:

python:
install:
- requirements: requirements-docs.txt
- requirements: docs/requirements.txt
- method: pip
path: .
25 changes: 4 additions & 21 deletions Makefile
@@ -1,15 +1,6 @@
.PHONY: clean-pyc clean-build docs
.PHONY: clean-pyc clean-build build-docs

test:
@pytest -s

coverage:
@pytest --cov=mistune

clean: clean-build clean-pyc clean-docs

build:
@python3 -m build
clean: clean-build clean-pyc

clean-build:
@rm -fr build/
Expand All @@ -24,14 +15,6 @@ clean-pyc:
@find . -name '*~' -exec rm -f {} +
@find . -name '__pycache__' -exec rm -fr {} +

clean-docs:
@rm -fr docs/_build

docs:
@$(MAKE) -C docs html

publish:
@twine upload dist/*.tar.gz
@twine upload dist/*.whl

.PHONY: build
build-docs:
@sphinx-build docs build/_html -a
Expand Up @@ -2,4 +2,3 @@
<a style="display: flex;justify-content: center;margin-bottom: 0.5rem;" href="https://typlog.com/"><img src="https://typlog.com/android-chrome-512x512.png" alt="Typlog" width="100" height="100"></a>
<div class="text" style="font-size:0.86rem"><a href="https://typlog.com/?utm_source=mistune&utm_medium=docs">A blogging and podcast hosting platform, simple yet elegant.</a></div>
</div>
<div class="js-carbon" data-carbon-code="CE7DKK3W" data-carbon-placement="mistune"></div>
8 changes: 0 additions & 8 deletions docs/_templates/partials/webfonts.html

This file was deleted.

35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

4 changes: 4 additions & 0 deletions docs/requirements.txt
@@ -0,0 +1,4 @@
sphinx==6.2.1
sphinx-copybutton==0.5.2
sphinx-design==0.4.1
shibuya
2 changes: 0 additions & 2 deletions requirements-docs.txt

This file was deleted.

4 changes: 2 additions & 2 deletions serve-doc.py
@@ -1,5 +1,5 @@
from livereload import Server, shell

app = Server()
app.watch("docs/*.rst", shell("make docs"), delay=2)
app.serve(root="docs/_build/html/")
app.watch("docs", shell("make build-docs"), delay=2)
app.serve(root="build/_html/")
2 changes: 1 addition & 1 deletion src/mistune/toc.py
Expand Up @@ -9,7 +9,7 @@ def add_toc_hook(md, min_level=1, max_level=3, heading_id=None):
from mistune.toc import add_toc_hook, render_toc_ul
md = mistune.create_markdown(...)
add_toc_hook(md, level, heading_id)
add_toc_hook(md)
html, state = md.parse(text)
toc_items = state.env['toc_items']
Expand Down

0 comments on commit b81197d

Please sign in to comment.