Skip to content

Commit

Permalink
Fix in-page anchor navigation by disabling jsfh script additions
Browse files Browse the repository at this point in the history
  • Loading branch information
chad-earthscope committed Jul 16, 2023
1 parent ffee983 commit bb09fbd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 8 additions & 0 deletions _static/css/schema_doc.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
body {
font: 16px/1.5em "Overpass", "Open Sans", Helvetica, sans-serif;
color: #333;
font-weight: 300;
padding: 40px;
}

.btn.btn-link {
font-size: 18px;
user-select: text;
}

.jsfh-animated-property {
Expand Down
2 changes: 1 addition & 1 deletion _static/js/schema_doc.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme
Expand Down Expand Up @@ -88,24 +88,27 @@
html_css_files = [
'css/fdsn_rtd_theme.css',
'css/custom.css',
'css/schema_doc.css',
# 'css/schema_doc.css',
]

html_js_files = [
'js/sidebar_context.js',
'js/schema_doc.min.js',
# 'js/schema_doc.min.js',
]

# -- Generate JSON schema documentation -------------------------------
jsfh_config = GenerationConfiguration(copy_css=False,
copy_js=False,
jsfh_config = GenerationConfiguration(copy_css=True,
copy_js=True,
expand_buttons=True,
with_footer=False)

generate_from_filename("extra-headers/ExtraHeaders-FDSN-v1.0.schema-2023-07.json",
"extra-headers/ExtraHeaders-FDSN-v1.0.schema.html",
config=jsfh_config)

os.rename("extra-headers/schema_doc.css", "_static/css/schema_doc.css")
os.rename("extra-headers/schema_doc.min.js", "_static/js/schema_doc.min.js")

# Mark as draft, disable for releases
sphinxmark_enable = False

Expand Down

0 comments on commit bb09fbd

Please sign in to comment.