Skip to content

Commit bf9f637

Browse files
committed
Update sphinxemoji config
1 parent 8d45436 commit bf9f637

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

doc-source/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@
7070
def setup(app):
7171
# 3rd party
7272
from sphinx_toolbox.latex import better_header_layout
73+
from sphinxemoji import sphinxemoji
7374

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

7682

7783
needspace_amount = r'5\baselineskip'

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ extensions = [
6262
"sphinx.ext.mathjax",
6363
"sphinxcontrib.extras_require",
6464
"sphinx.ext.todo",
65-
"sphinxemoji.sphinxemoji",
6665
"notfound.extension",
6766
"sphinx_copybutton",
6867
"sphinxcontrib.default_values",
@@ -77,7 +76,6 @@ extensions = [
7776
"sphinx_toolbox_experimental.changelog",
7877
"sphinx_packaging.peps",
7978
]
80-
sphinxemoji_style = "twemoji"
8179
gitstamp_fmt = "%d %b %Y"
8280
templates_path = [ "_templates",]
8381
html_static_path = [ "_static",]

tests/test_sphinx_pyproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_parse_our_config(advanced_data_regression: AdvancedDataRegressionFixtur
2727
assert config["language"] == "en"
2828
assert config["package_root"] == "sphinx_pyproject"
2929
assert config["github_repository"] == "sphinx-pyproject"
30-
assert config["sphinxemoji_style"] == "twemoji"
30+
# assert config["sphinxemoji_style"] == "twemoji"
3131
assert config["templates_path"] == ["_templates"]
3232
assert config["add_module_names"] is False
3333
assert "html_theme_options" not in config

tests/test_sphinx_pyproject_/test_parse_our_config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ extensions:
3333
- sphinx.ext.mathjax
3434
- sphinxcontrib.extras_require
3535
- sphinx.ext.todo
36-
- sphinxemoji.sphinxemoji
3736
- notfound.extension
3837
- sphinx_copybutton
3938
- sphinxcontrib.default_values
@@ -66,7 +65,6 @@ package_root: sphinx_pyproject
6665
project: sphinx-pyproject
6766
pygments_style: default
6867
source_suffix: .rst
69-
sphinxemoji_style: twemoji
7068
suppress_warnings:
7169
- image.nonlocal_uri
7270
templates_path:

0 commit comments

Comments
 (0)