Skip to content

Commit

Permalink
Support plone-sphinx-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Aug 3, 2024
1 parent 310c670 commit d811c01
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ CACHIX_CACHE ?= datakurre
TEST = $(wildcard tests/*.py)
SRC = $(wildcard src/sphinxcontrib/httpexample/*.py)

# Sphinx variables
# You can set these variables from the command line.
SPHINXOPTS ?=
# Internal variables.
SPHINXBUILD = "$(realpath env/bin/sphinx-build)"
SPHINXAUTOBUILD = "$(realpath env/bin/sphinx-autobuild)"
DOCS_DIR = ./docs/
BUILDDIR = ../_build/
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .

.PHONY: all
all: test coverage

Expand All @@ -27,10 +37,14 @@ cache:

.PHONY: docs
docs:
sphinx-build -b html docs docs/html
ifeq "$(PYTHON)" "python27"
sphinx-build -b pdf docs docs/pdf
endif
cd $(DOCS_DIR) && $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

.PHONY: livehtml
livehtml: ## Rebuild Sphinx documentation on changes, with live-reload in the browser
cd "$(DOCS_DIR)" && ${SPHINXAUTOBUILD} \
--ignore "*.swp" \
--port 8050 \
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)

.PHONY: coverage
coverage: .coverage
Expand Down
2 changes: 2 additions & 0 deletions docs/_static/jquery-3.6.0.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# html_theme = 'sphinx_rtd_theme'
html_theme = 'plone_sphinx_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -135,6 +136,10 @@
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

html_js_files = [
'jquery-3.6.0.min.js',
]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ MarkupSafe
astunparse
coverage
coveralls
docutils==0.17.1
docutils
#docutils==0.17.1
flake8-blind-except
flake8-coding
flake8-debugger
Expand All @@ -19,7 +20,9 @@ pyyaml
rst2pdf
snapshottest==0.5.0
sphinx
sphinx-autobuild
sphinx-testing
sphinx_rtd_theme
plone-sphinx-theme
sphinxcontrib-httpdomain
toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
(function() {
var jQuery = window.jQuery || function() {};

console.log("1");
jQuery(function($) {
console.log("2");
$('.http-example.container').each(function() {
var $container = $(this),
$blocks = $(this).children(),
Expand Down

0 comments on commit d811c01

Please sign in to comment.