-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): try to generate docs via sphinx
- Loading branch information
Showing
13 changed files
with
979 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: test-and-docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_run: | ||
workflows: | ||
- release-please | ||
types: | ||
- complete | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: docsgen | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
- name: install pip deps | ||
run: | | ||
python -m pip install myst-parser pydata-sphinx-theme sphinx-lua sphinx-press-theme | ||
- name: Build docs | ||
shell: bash | ||
run: | | ||
make html | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_build/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: lemmy-help | ||
|
||
on: [push] | ||
|
||
env: | ||
PLUGIN_NAME: pathlib.nvim | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
name: emmylua to vimdoc | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Generating help | ||
run: | | ||
curl -Lq https://github.com/numToStr/lemmy-help/releases/latest/download/lemmy-help-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./lemmy-help ./lua/pathlib/{init,base,posix,windows}.lua | grep -v -- ' --' > doc/${{env.PLUGIN_NAME}}.txt | ||
- name: Commit | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: ${{ github.head_ref }} | ||
commit_message: "chore(docs): auto-generate vimdoc" | ||
file_pattern: doc/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
!.luarc.json | ||
/index.norg | ||
|
||
### Sphinx ### | ||
/_build/ | ||
|
||
### Vim ### | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'pathlib.nvim' | ||
copyright = '2023, pysan3' | ||
author = 'pysan3' | ||
release = '0.3.2' # x-release-please-version | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'sphinxcontrib.luadomain', | ||
'sphinx_lua', | ||
'myst_parser', | ||
] | ||
|
||
templates_path = ['_templates'] | ||
source_suffix = ['.rst', '.md'] | ||
exclude_patterns = [ | ||
'_build', | ||
'Thumbs.db', | ||
'.DS_Store', | ||
'lua_modules', | ||
] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'pydata_sphinx_theme' | ||
html_theme_options = { | ||
'navigation_with_keys': False, | ||
} | ||
# html_theme = 'press' | ||
html_static_path = ['_static'] | ||
|
||
|
||
# Available options and default values | ||
lua_source_path = ["./lua/pathlib"] | ||
lua_source_encoding = 'utf8' | ||
lua_source_comment_prefix = '---' | ||
lua_source_use_emmy_lua_syntax = True | ||
lua_source_private_prefix = '_' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PathlibPath | ||
======================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 0 | ||
:caption: Index: | ||
|
||
.. lua:autoclass:: PathlibPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PathlibPosixPath | ||
======================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 0 | ||
:caption: Index: | ||
|
||
.. lua:autoclass:: PathlibPosixPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PathlibWindowsPath | ||
======================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 0 | ||
:caption: Index: | ||
|
||
.. lua:autoclass:: PathlibWindowsPath |
Oops, something went wrong.