Skip to content

Commit b76ba8a

Browse files
author
Frederick Ross
committed
Automate edits to the Sphinx HTML output that Andrea was doing by hand.
Hide the paragraph mark at the end of headers. Remove the delimiter in the navigation header. Made external links have target="_blank".
1 parent 9fb692d commit b76ba8a

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

docs/CSS/splunk_customizations.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a.headerlink { display: none; }
2+

docs/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,19 @@ clean:
4343

4444
html:
4545
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
46+
sh munge_links.sh $(BUILDDIR)/html
4647
@echo
4748
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
4849

4950
dirhtml:
5051
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
52+
sh munge_links.sh $(BUILDDIR)/dirhtml
5153
@echo
5254
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
5355

5456
singlehtml:
5557
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
58+
sh munge_links.sh $(BUILDDIR)/singlehtml
5659
@echo
5760
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
5861

docs/_templates/layout.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends '!layout.html' %}
2+
3+
{% set css_files = css_files + ["_static/splunk_customizations.css"] %}
4+
5+
{% set reldelim2 = "" %}

docs/munge_links.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
TARGET=$1
4+
5+
for file in $TARGET/*.html; do
6+
echo ${file}
7+
sed -i -e 's/class="reference external"/class="reference external" target="_blank"/g' "${file}"
8+
done

0 commit comments

Comments
 (0)