Skip to content

Commit

Permalink
Merge branch 'master' into feature/transform-doctree
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed May 6, 2024
2 parents 2736499 + 790e32b commit 659be33
Show file tree
Hide file tree
Showing 20 changed files with 287 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .age.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
current_version = "3.0.1"
current_version = "3.0.2"

[[files]]
path = "demo/index.rst"
Expand Down
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/1-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Trouble report
description: Happen troubles using this library.
labels: ["triage"]
projects: []
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: |
## To reproduce
Steps to reproduce the behavior:
* Go to '...'
* Click on '....'
* Scroll down to '....'
* See error
## Expected behavior
A clear and concise description of what you expected to happen.
## Screenshots
If applicable, add screenshots to help explain your problem.
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: What Operating style of our software are you running?
value: "Windows 11"
validations:
required: true
- type: input
id: runtime
attributes:
label: Python runtime and version
description: |
What python runtime are you seeing the problem on?
You can get `python -VV` in terminal.
value: "Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]"
validations:
required: true
- type: input
id: Sphinx
attributes:
label: Sphinx version
description: |
What Sphinx of our software are you running ?
You can get `python -c "import sphinx as lib; print(lib.__version__)"` in terminal.
value: "7.3.7"
validations:
required: true
- type: input
id: version
attributes:
label: Library version
description: |
What version of our software are you running?
You can get `python -c "import sphinx_revealjs as lib; print(lib.__version__)"` in terminal.
value: "3.0.0"
validations:
required: true
- type: textarea
id: extra
attributes:
label: Extra context
description: |
Please write other information as much as possible!
(Using other extensions, logs in build and more)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/9-extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Extra issues
description: Please use this if it does not match for other templates.
labels: ["triage"]
projects: []
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this report!
- type: textarea
id: content
attributes:
label: What do you tell us?
description: Write content that you want to tell us.
placeholder: Tell us what you see!
value: "Your message"
validations:
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
6 changes: 3 additions & 3 deletions .github/release-body.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Update reveal.js version.
Small bug-fix and mark deprecated.

- Changelog is https://github.com/attakei/sphinx-revealjs/blob/v3.0.1/CHANGELOG.rst
- Source changes is https://github.com/attakei/sphinx-revealjs/compare/v3.0.0...v3.0.1
- Changelog is https://github.com/attakei/sphinx-revealjs/blob/v3.0.2/CHANGELOG.rst
- Source changes is https://github.com/attakei/sphinx-revealjs/compare/v3.0.1...v3.0.2
5 changes: 3 additions & 2 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ jobs:
python tools/fetch_revealjs.py
pip install ".[screenshot,demo]"
playwright install
make -C demo demo
make -C demo mini18n-revealjs
touch demo/_build/mini18n-revealjs/.nojeykll
env:
GTAGJS_IDS: ${{ secrets.GTAGJS_IDS }}
DEMO_URL_BASE: "https://attakei.github.io/sphinx-revealjs/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: demo/_build/demo/
path: demo/_build/mini18n-revealjs/
deploy:
needs: build
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Continuous Integration

on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
workflow_dispatch:
schedule:
Expand Down Expand Up @@ -46,8 +50,6 @@ jobs:
python tools/fetch_revealjs.py
pip install '.[screenshot,test]' 'Sphinx[test]${{ matrix.sphinx-version }}'
playwright install
- if: ${{ matrix.sphinx-version == '>=3.0.0,<4.0.0' }}
run: pip install 'Jinja2<3.0.0' 'MarkupSafe<2.0.0' 'sphinxcontrib-applehelp<1.0.5' 'sphinxcontrib-devhelp<1.0.3' 'sphinxcontrib-htmlhelp<2.0.2' 'sphinxcontrib-serializinghtml<1.1.6' 'sphinxcontrib-qthelp<1.0.5'
- if: ${{ matrix.sphinx-version == '>=4.0.0,<5.0.0' }}
run: pip install 'sphinxcontrib-applehelp<1.0.5' 'sphinxcontrib-devhelp<1.0.3' 'sphinxcontrib-htmlhelp<2.0.2' 'sphinxcontrib-serializinghtml<1.1.6' 'sphinxcontrib-qthelp<1.0.5'
- name: Run tests
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
ver 3.0.2
=========

:Release date: 2024-05-06 (JST)
:Reveal.js version: 5.1.0

Fixes
-----

* Enable to use ``metatags`` variable in ``revealjs-simple`` theme.

Others
------

* Add message for deprecated: Sphinx<5.0 and Python<3.8.
* Use oEmbedPy in demo (instead of sphinxcontrib-oembed).

ver 3.0.1
=========

Expand Down
8 changes: 1 addition & 7 deletions demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile demo intl

demo:
@$(SPHINXBUILD) -b dirrevealjs "$(SOURCEDIR)" "$(BUILDDIR)/demo/ja" $(SPHINXOPTS) $(O) -D language="ja"
@$(SPHINXBUILD) -b dirrevealjs "$(SOURCEDIR)" "$(BUILDDIR)/demo/en" $(SPHINXOPTS) $(O)
./gen-index.py $(BUILDDIR)/demo
touch $(BUILDDIR)/demo/.nojekyll
.PHONY: help Makefile intl

intl:
@$(SPHINXBUILD) -M gettext "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Expand Down
1 change: 1 addition & 0 deletions demo/_sass/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $green: #859900;
// Override theme settings (see ../template/settings.scss)
$mainColor: $base1;
$headingColor: $base2;
$heading1Size: $heading1Size * 0.8;
$headingTextShadow: none;
$backgroundColor: $base03;
$linkColor: $blue;
Expand Down
12 changes: 6 additions & 6 deletions demo/_sections/interactive-content.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ Using ``container`` directive, you can work stack layouting.
.. revealjs-fragments::
.. image:: https://placekitten.com/450/300
.. image:: https://picsum.photos/450/300
.. image:: https://placekitten.com/300/450
.. image:: https://picsum.photos/300/450
.. image:: https://placekitten.com/400/400
.. image:: https://picsum.photos/400/400
.. revealjs-break::

Expand All @@ -122,8 +122,8 @@ Using ``container`` directive, you can work stack layouting.

.. revealjs-fragments::

.. image:: https://placekitten.com/450/300
.. image:: https://picsum.photos/450/300

.. image:: https://placekitten.com/300/450
.. image:: https://picsum.photos/300/450

.. image:: https://placekitten.com/400/400
.. image:: https://picsum.photos/400/400
85 changes: 42 additions & 43 deletions demo/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@

# -- General configuration ---------------------------------------------------
extensions = [
"atsphinx.mini18n",
"oembedpy.ext.sphinx",
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx_revealjs",
"sphinx_revealjs.ext.footnotes",
"sphinx_revealjs.ext.screenshot",
"sphinxcontrib.budoux",
"sphinxcontrib.gtagjs",
"sphinxcontrib.oembed",
"sphinxcontrib.sass",
"sphinxext.opengraph",
]
Expand All @@ -48,6 +49,18 @@
"hash": True,
"center": True,
"transition": "slide",
"customcontrols": {
"controls": [
{
"icon": "EN",
"action": "location.href = '/en/';",
},
{
"icon": "JA",
"action": "location.href = '/ja/';",
},
]
},
}
revealjs_script_plugins = [
{
Expand All @@ -62,76 +75,62 @@
"name": "RevealMath",
"src": "revealjs/plugin/math/math.js",
},
{
"name": "RevealCustomControls",
"src": "https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/plugin.js",
},
]
revealjs_css_files = [
"revealjs/plugin/highlight/zenburn.css",
"https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/style.css",
]
revealjs_notes_from_comments = True

# -- Options for HTMLHelp output ---------------------------------------------
htmlhelp_basename = "sphinx-revealjsdoc"

# -- Options for LaTeX output ------------------------------------------------
latex_elements = {}
latex_documents = [
(
master_doc,
"sphinx-revealjs.tex",
"sphinx-revealjs Documentation",
"Kazuya Takei",
"manual",
),
]

# -- Options for manual page output ------------------------------------------
man_pages = [
(master_doc, "sphinx-revealjs", "sphinx-revealjs Documentation", [author], 1)
]

# -- Options for Texinfo output ----------------------------------------------
texinfo_documents = [
(
master_doc,
"sphinx-revealjs",
"sphinx-revealjs Documentation",
author,
"sphinx-revealjs",
"One line description of project.",
"Miscellaneous",
),
]

# -- Options for Epub output -------------------------------------------------
epub_title = project
epub_exclude_files = ["search.html"]

# -- Options for extensions --------------------------------------------------
# - sphinx.ext.todo
todo_include_todos = True

# - sphinxcontrib.gtagjs
if "GTAGJS_IDS" in os.environ:
gtagjs_ids = os.environ["GTAGJS_IDS"].split(",")

# - sphinxcontrib.budoux
budoux_targets = ["h1", "h2", "h3"]

# - sphinxcontrib.sass
sass_src_dir = "_sass"
sass_out_dir = "_static"
sass_targets = {"custom.scss": "custom.css"}
sass_include_paths = [
get_revealjs_path() / "css" / "theme",
]

# sphinxext-opengraph
# sphinxext.opengraph
ogp_site_url = os.environ.get("DEMO_URL_BASE", "http://localhost:8000/")
ogp_custom_meta_tags = [
'<meta name="twitter:card" content="summary_large_image" />',
'<meta name="twitter:site" content="@attakei" />',
]

# atsphinx-mini18n
mini18n_default_language = "en"
mini18n_support_languages = ["en", "ja"]
mini18n_basepath = "/sphinx-revealjs/"


def update_ogp(app, config):
print(config.ogp_site_url, config.language)
config.ogp_site_url = urljoin(config.ogp_site_url, f"{config.language}/")


def _add_navigation_for_mini18n(app, config):
config.revealjs_script_conf["customcontrols"] = {
"controls": [
{
"icon": lang.upper(),
"action": f"location.href = '{config.mini18n_basepath}{lang}/';",
}
for lang in config.mini18n_support_languages
]
}


def setup(app):
app.connect("config-inited", update_ogp)
app.connect("config-inited", _add_navigation_for_mini18n)
4 changes: 2 additions & 2 deletions demo/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Introduction of sphinx-revealjs
===============================

:Based version: 3.0.1
:Demo updated: 2022-11-13
:Based version: 3.0.2
:Demo updated: 2024-05-06 JST

Overview
========
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ doc = [
"atsphinx-htmx-boost",
]
demo = [
"atsphinx-mini18n >=0.3.1",
"oEmbedPy",
"sphinx-intl >=2.0.1,<3",
"sphinxcontrib-gtagjs >=0.2.0,<0.3",
"sphinxcontrib-budoux",
"sphinxcontrib-oembed",
"sphinxcontrib-sass",
"sphinxext-opengraph",
]
Expand Down

0 comments on commit 659be33

Please sign in to comment.