-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move mkDocs CSS and JS resource calls from template to config
- Loading branch information
1 parent
4d292ba
commit 1154d8f
Showing
3 changed files
with
31 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,9 +45,31 @@ theme: | |
- navigation.sections | ||
- navigation.footer | ||
|
||
# Additional CSS. Mind the order! | ||
extra_css: | ||
# CSS Tweaks | ||
- docs/_assets/stylesheets/extra.css | ||
- https://unpkg.com/[email protected]/themes/prism-twilight.min.css # Prism JS syntax highlighting | ||
- docs/_assets/stylesheets/extra.css # mkDocs theme tweaks | ||
- docs/_assets/generated/docs-custom-properties.css # Load React UI CSS custom properties to make them accessible in the document root (outside shadowDOM) so we can preview colors etc. | ||
|
||
# Additional JS. Mind the order! | ||
extra_javascript: | ||
# First load dependencies | ||
- https://unpkg.com/@babel/[email protected]/babel.min.js | ||
- https://unpkg.com/[email protected]/umd/react.development.js | ||
- https://unpkg.com/[email protected]/umd/react-dom.development.js | ||
- https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.core.umd.min.js | ||
- https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.dom.umd.min.js | ||
- https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.react-dom.umd.min.js | ||
- docs/_assets/generated/react-ui.js | ||
- docs/_assets/js/ruiIcon.js | ||
- docs/_assets/js/ruiSwatch.js | ||
|
||
# Then load and init Docoff | ||
- https://unpkg.com/@react-ui-org/[email protected]/public/generated/bundle.js | ||
|
||
# Then load non-Docoff code highlighiting | ||
- https://unpkg.com/[email protected]/components/prism-core.min.js | ||
- https://unpkg.com/[email protected]/plugins/autoloader/prism-autoloader.min.js | ||
|
||
# Must be open to external connections since MkDocs run in a docker container | ||
dev_addr: '0.0.0.0:8000' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,8 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block libs %} | ||
<!-- We need to load CSS custom properties to make them accessible in the document root (outside shadowDOM) so we can preview colors etc. --> | ||
<link rel="stylesheet" href="/docs/_assets/generated/docs-custom-properties.css" /> | ||
|
||
<!-- We load Prism by hand to match the style used by Docoff --> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/themes/prism-twilight.min.css" /> | ||
{% endblock %} | ||
|
||
{% block scripts %} | ||
{% block site_meta %} | ||
{{ super() }} | ||
<!-- First load dependencies --> | ||
<script crossorigin src="https://unpkg.com/@babel/[email protected]/babel.min.js"></script> | ||
<script crossorigin src="https://unpkg.com/[email protected]/umd/react.development.js"></script> | ||
<script crossorigin src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script> | ||
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.core.umd.min.js"></script> | ||
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.dom.umd.min.js"></script> | ||
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.react-dom.umd.min.js"></script> | ||
<script src="/docs/_assets/generated/react-ui.js" type="application/javascript"></script> | ||
<script src="/docs/_assets/js/ruiIcon.js" type="application/javascript"></script> | ||
<script src="/docs/_assets/js/ruiSwatch.js" type="application/javascript"></script> | ||
|
||
<!-- Then load and init Docoff --> | ||
<script crossorigin src="https://unpkg.com/@react-ui-org/[email protected]/public/generated/bundle.js"></script> | ||
|
||
<!-- Then load non-Docoff code highlighiting --> | ||
<script src="https://unpkg.com/[email protected]/components/prism-core.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/plugins/autoloader/prism-autoloader.min.js"></script> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" /> | ||
<link rel="preconnect" href="https://unpkg.com" /> | ||
{% endblock %} |