Skip to content

Commit

Permalink
Update sphinxemoji config
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Apr 17, 2024
1 parent 8d45436 commit bf9f637
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@
def setup(app):
# 3rd party
from sphinx_toolbox.latex import better_header_layout
from sphinxemoji import sphinxemoji

app.connect("config-inited", lambda app, config: better_header_layout(config))
app.connect("build-finished", sphinxemoji.copy_asset_files)
app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js")
app.add_js_file("twemoji.js")
app.add_css_file("twemoji.css")
app.add_transform(sphinxemoji.EmojiSubstitutions)


needspace_amount = r'5\baselineskip'
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ extensions = [
"sphinx.ext.mathjax",
"sphinxcontrib.extras_require",
"sphinx.ext.todo",
"sphinxemoji.sphinxemoji",
"notfound.extension",
"sphinx_copybutton",
"sphinxcontrib.default_values",
Expand All @@ -77,7 +76,6 @@ extensions = [
"sphinx_toolbox_experimental.changelog",
"sphinx_packaging.peps",
]
sphinxemoji_style = "twemoji"
gitstamp_fmt = "%d %b %Y"
templates_path = [ "_templates",]
html_static_path = [ "_static",]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sphinx_pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_parse_our_config(advanced_data_regression: AdvancedDataRegressionFixtur
assert config["language"] == "en"
assert config["package_root"] == "sphinx_pyproject"
assert config["github_repository"] == "sphinx-pyproject"
assert config["sphinxemoji_style"] == "twemoji"
# assert config["sphinxemoji_style"] == "twemoji"
assert config["templates_path"] == ["_templates"]
assert config["add_module_names"] is False
assert "html_theme_options" not in config
Expand Down
2 changes: 0 additions & 2 deletions tests/test_sphinx_pyproject_/test_parse_our_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extensions:
- sphinx.ext.mathjax
- sphinxcontrib.extras_require
- sphinx.ext.todo
- sphinxemoji.sphinxemoji
- notfound.extension
- sphinx_copybutton
- sphinxcontrib.default_values
Expand Down Expand Up @@ -66,7 +65,6 @@ package_root: sphinx_pyproject
project: sphinx-pyproject
pygments_style: default
source_suffix: .rst
sphinxemoji_style: twemoji
suppress_warnings:
- image.nonlocal_uri
templates_path:
Expand Down

0 comments on commit bf9f637

Please sign in to comment.