Skip to content

sphinxnotes-snippet v2 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sphinx-notes/template",
"commit": "80a61fa9abcd9474d8cfbc36d0bf5d41f99c916c",
"commit": "0b096cd7ecff1b28ee8c2887ba3321418be34b9a",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -14,7 +14,8 @@
"github_repo": "snippet",
"pypi_name": "sphinxnotes-snippet",
"pypi_owner": "SilverRainZ",
"_template": "https://github.com/sphinx-notes/template"
"_template": "https://github.com/sphinx-notes/template",
"_commit": "0b096cd7ecff1b28ee8c2887ba3321418be34b9a"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
pages:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ view:

.PHONY: clean
clean:
$(MAKE) -C docs/ clean
$(RM) dist/
$(MAKE) -C docs/ clean | true
$(RM) dist/ | true

.PHONY: clean
fmt:
Expand Down
11 changes: 0 additions & 11 deletions docs/_templates/confval.rst

This file was deleted.

31 changes: 0 additions & 31 deletions docs/_templates/example.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/_templates/version.rst

This file was deleted.

52 changes: 4 additions & 48 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,49 +74,6 @@

# -- Extensions -------------------------------------------------------------

#
extensions.append('sphinxnotes.any')
from sphinxnotes.any import Schema, Field as F
#
version_schema = Schema('version',
name=F(unique=True, referenceable=True, required=True, form=F.Form.LINES),
attrs={'date': F(referenceable=True)},
content=F(form=F.Form.LINES),
description_template=open('_templates/version.rst', 'r').read(),
reference_template='🏷️{{ title }}',
missing_reference_template='🏷️{{ title }}',
ambiguous_reference_template='🏷️{{ title }}')
confval_schema = Schema('confval',
name=F(unique=True, referenceable=True, required=True, form=F.Form.LINES),
attrs={
'type': F(),
'default': F(),
'choice': F(form=F.Form.WORDS),
'versionadded': F(),
'versionchanged': F(form=F.Form.LINES),
},
content=F(),
description_template=open('_templates/confval.rst', 'r').read(),
reference_template='⚙️{{ title }}',
missing_reference_template='⚙️{{ title }}',
ambiguous_reference_template='⚙️{{ title }}')
example_schema = Schema('example',
name=F(referenceable=True),
attrs={'style': F()},
content=F(form=F.Form.LINES),
description_template=open('_templates/example.rst', 'r').read(),
reference_template='📝{{ title }}',
missing_reference_template='📝{{ title }}',
ambiguous_reference_template='📝{{ title }}')
#
any_schemas = [
version_schema,
confval_schema,
example_schema,
]
primary_domain = 'any'
#

extensions.append('sphinx.ext.extlinks')
extlinks = {
'issue': ('https://github.com/sphinx-notes/snippet/issues/%s', '💬%s'),
Expand All @@ -138,21 +95,21 @@
'jinja': ('https://jinja.palletsprojects.com/en/latest/', None),
}

#
extensions.append('sphinxnotes.comboroles')
comboroles_roles = {
'parsed_literal': (['literal'], True),
}
#

#
extensions.append('sphinxnotes.project')
primary_domain = 'any'

# -- Eat your own dog food --------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../src/sphinxnotes'))
extensions.append('snippet.ext')
extensions.append('snippet')

# DOG FOOD CONFIGURATION START

Expand All @@ -163,4 +120,3 @@
extensions.append('sphinxcontrib.asciinema')

# DOG FOOD CONFIGURATION END
#
8 changes: 6 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
sphinxnotes-snippet
===================

.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/snippet/github-pages
.. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/snippet/github-pages?label=docs
:target: https://sphinx.silverrainz.me/snippet
:alt: Documentation Status

Expand All @@ -21,7 +21,11 @@ sphinxnotes-snippet
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
:alt: PyPI Package Downloads

|docs| |license| |pypi| |download|
.. |github| image:: https://img.shields.io/badge/GitHub-181717?style=flat&logo=github&logoColor=white/
:target: https://github.com/sphinx-notes/snippet
:alt: GitHub Repository

|docs| |license| |pypi| |download| |github|

Introduction
============
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
"Topic :: Utilities",
]

requires-python = ">=3.8"
requires-python = ">=3.12"
dependencies = [
"Sphinx >= 4",
"langid",
Expand Down Expand Up @@ -55,7 +55,7 @@ test = [
]
docs = [
"furo",
"sphinxnotes-any",
"sphinxnotes-project",
"sphinx_design",
"sphinx_copybutton",
"sphinxcontrib-gtagjs",
Expand Down
Loading