Skip to content

Commit 929daf4

Browse files
authored
1 parent 5a841a5 commit 929daf4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+546
-397
lines changed

.cruft.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"template": "https://github.com/sphinx-notes/template",
3+
"commit": "202f9756fdd661ab195d20bb6926a9481ee1d78a",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"namespace": "sphinxnotes",
8+
"name": "snippet",
9+
"full_name": "sphinxnotes-snippet",
10+
"author": "Sphinx documentation snippets manager",
11+
"description": "Sphinx documentation snippets manager",
12+
"version": "1.0",
13+
"github_owner": "sphinx-notes",
14+
"github_repo": "snippet",
15+
"pypi_name": "sphinxnotes-snippet",
16+
"pypi_owner": "SilverRainZ",
17+
"dependencies": [
18+
"Sphinx >= 4"
19+
],
20+
"additional_docs": [],
21+
"_template": "https://github.com/sphinx-notes/template"
22+
}
23+
},
24+
"directory": null
25+
}

.github/workflows/pages.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
name: Pages
1+
name: Deploy Sphinx documentation to Pages
2+
3+
# Runs on pushes targeting the default branch
24
on:
35
push:
4-
branches:
5-
- master
6+
branches: [master]
7+
8+
# Cancel any in-progress job or run
9+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
10+
concurrency:
11+
group: ${{ github.ref }}
12+
cancel-in-progress: true
13+
614
jobs:
7-
build:
15+
pages:
816
runs-on: ubuntu-20.04
17+
environment:
18+
name: github-pages
19+
url: ${{ steps.deployment.outputs.page_url }}
20+
permissions:
21+
pages: write
22+
id-token: write
923
steps:
10-
- name: Checkout
11-
uses: actions/checkout@master
12-
with:
13-
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
14-
- name: Build and Commit
15-
uses: sphinx-notes/pages@v2
16-
with:
17-
requirements_path: ./docs/requirements.txt
18-
- name: Push changes
19-
uses: ad-m/github-push-action@master
20-
with:
21-
github_token: ${{ secrets.GITHUB_TOKEN }}
22-
branch: gh-pages
24+
- id: deployment
25+
uses: sphinx-notes/pages@v3

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
# Sphinx
132-
_build/
131+
# Poetry
132+
poetry.lock
133133

134-
# Neovim
135-
.nvimlog
134+
# Sphinx
135+
docs/_build/

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2020, Sphinx Notes
3+
Copyright (c) 2023, Sphinx documentation snippets manager
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without
@@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2626
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2727
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is generated from sphinx-notes/template.
2+
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
3+
4+
include LICENSE
5+
include README.rst
6+
7+
recursive-include tests *
8+
recursive-exclude * __pycache__
9+
recursive-exclude * *.py[co]
10+
11+
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif

Makefile

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1-
LANG=en_US.UTF-8
1+
# This file is generated from sphinx-notes/template.
2+
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
3+
4+
LANG = en_US.UTF-8
25

36
MAKE = make
47
PY = python3
58
RM = rm -rf
69

710
.PHONY: docs
811
docs:
9-
$(RM) docs/_build
1012
$(MAKE) -C docs/
1113

12-
.PHONY: dist
13-
dist: setup.py
14-
$(RM) dist/ build/ *.egg-info/
15-
$(PY) setup.py sdist bdist_wheel
16-
$(PY) -m twine check dist/*
14+
.PHONY: test
15+
test:
16+
$(PY) -m unittest discover -s tests -v
1717

18-
.PHONY: upload
19-
upload: dist/
20-
$(PY) -m twine upload --repository pypi $<*
18+
.PHONY: dist
19+
dist: pyproject.toml
20+
$(RM) dist/ # clean up old dist
21+
$(PY) -m build
2122

2223
.PHONY: install
2324
install: dist
2425
$(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl
2526

26-
.PHONY: test
27-
test:
28-
$(PY) -m unittest -v
27+
.PHONY: upload
28+
upload: dist
29+
$(PY) -m twine upload --repository pypi $</*
30+
31+
.PHONY: test-upload
32+
test-upload: dist
33+
$(PY) -m twine upload --repository testpypi $</*
2934

30-
cli:
31-
$(PY) ./utils/cli.py --config utils/conf.py $(args)
35+
.PHONY: update-template
36+
update-template:
37+
$(PY) -m cruft update

README.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
1+
.. This file is generated from sphinx-notes/template.
2+
You need to consider modifying the TEMPLATE or modifying THIS FILE.
3+
14
===================
25
sphinxnotes-snippet
36
===================
47

5-
Please refer to https://sphinx-notes.github.io/snippet/ for documentation.
8+
.. image:: https://img.shields.io/github/actions/workflow/status/sphinx-notes/snippet/pages.yml
9+
:target: https://sphinx.silverrainz.me/snippet
10+
:alt: Documentation Status
11+
12+
.. image:: https://img.shields.io/github/license/sphinx-notes/snippet
13+
:target: https://github.com/sphinx-notes/snippet/LICENSE
14+
:alt: Open Source License
15+
16+
.. image:: https://img.shields.io/pypi/v/sphinxnotes-snippet.svg
17+
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
18+
:alt: PyPI Package
19+
20+
.. image:: https://img.shields.io/pypi/dw/sphinxnotes-snippet
21+
:target: https://pypi.python.org/pypi/sphinxnotes-snippet
22+
:alt: PyPI Package Downloads
23+
24+
Sphinx documentation snippets manager.
25+
26+
* Documentation: https://sphinx.silverrainz.me/snippet
27+
* Source: https://github.com/sphinx-notes/snippet
28+
* Changelog: https://sphinx.silverrainz.me/snippet/changelog.html
29+
* Tracker: https://github.com/sphinx-notes/snippet/issues
30+
* Download: https://pypi.org/project/sphinxnotes-snippet/#files

docs/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
# This file is generated from sphinx-notes/template.
2+
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
3+
14
# Minimal makefile for Sphinx documentation
2-
#
35

4-
# You can set these variables from the command line, and also
5-
# from the environment for the first two.
6-
SPHINXOPTS ?=
7-
SPHINXBUILD ?= sphinx-build
6+
# You can set these variables from the command line.
7+
SPHINXOPTS =
8+
SPHINXBUILD = python3 -msphinx
89
SOURCEDIR = .
910
BUILDDIR = _build
1011

docs/_static/.gitkeep

Whitespace-only changes.

docs/_templates/version.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. list-table::
2+
:align: left
3+
4+
* - :ref:`📅 {{ date }} <any-version.date>`
5+
- :tag:`{{ title }}`
6+
7+
8+
{% for line in content %}
9+
{{ line }}
10+
{% endfor %}
11+

0 commit comments

Comments
 (0)