Merge pull request 'feat: Add extract_on_copy
option' (#18) from copy_first into main
Reviewed-on: #18
This commit is contained in:
commit
6247034203
@ -1,4 +1,4 @@
|
|||||||
# MkDocs semiliterate Plugin
|
# ![Dreaming of integrated documentation](assets/icons8-ask-question-100.png) MkDocs semiliterate Plugin
|
||||||
|
|
||||||
This plugin for [MkDocs](http://mkdocs.org) is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://athackst.github.io/mkdocs-simple-plugin). It allows you to include content from one file into another (via `{! ... !}` syntax), using exactly the same extraction specification that the `simple` plugin already uses for identifying documentation in source files.
|
This plugin for [MkDocs](http://mkdocs.org) is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://athackst.github.io/mkdocs-simple-plugin). It allows you to include content from one file into another (via `{! ... !}` syntax), using exactly the same extraction specification that the `simple` plugin already uses for identifying documentation in source files.
|
||||||
<!-- repo: --><!-- site: The current version of mkdocs-semiliterate is {! setup.cfg { extract: {start: name}, terminate: '(\d*\.\d*\.\d*)', ensurelines: false} !}. -->
|
<!-- repo: --><!-- site: The current version of mkdocs-semiliterate is {! setup.cfg { extract: {start: name}, terminate: '(\d*\.\d*\.\d*)', ensurelines: false} !}. -->
|
||||||
@ -28,6 +28,6 @@ or of course if your `pip` is already set up to use a Python 3.5 (or later) inst
|
|||||||
|
|
||||||
`pip install mkdocs-semiliterate`
|
`pip install mkdocs-semiliterate`
|
||||||
|
|
||||||
## License
|
## License and Acknowledgments
|
||||||
|
|
||||||
This software is licensed under [Apache 2.0](LICENSE).
|
This software is licensed under [Apache 2.0](LICENSE). [Icons8](https://icons8.com/icon/115368/ask-question) provided the icon.
|
||||||
|
BIN
assets/icons8-ask-question-100.png
Normal file
BIN
assets/icons8-ask-question-100.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
@ -8,7 +8,7 @@ plugins:
|
|||||||
- semiliterate:
|
- semiliterate:
|
||||||
merge_docs_dir: false
|
merge_docs_dir: false
|
||||||
ignore_folders: [build, dist, tests, semiliterate]
|
ignore_folders: [build, dist, tests, semiliterate]
|
||||||
include_extensions: [LICENSE]
|
include_extensions: [LICENSE, '.png']
|
||||||
extract_standard_markdown:
|
extract_standard_markdown:
|
||||||
extract:
|
extract:
|
||||||
replace: [['^(.*)<!-- repo: -->.*<!-- site:(.*?) -->(.*\s*)$', '\1\2\3']]
|
replace: [['^(.*)<!-- repo: -->.*<!-- site:(.*?) -->(.*\s*)$', '\1\2\3']]
|
||||||
|
@ -320,7 +320,7 @@ terminate: '^\s*\)'
|
|||||||
# `semiliterate` still incorporates all standard Markdown files
|
# `semiliterate` still incorporates all standard Markdown files
|
||||||
# because of the following `extract_standard_markdown` parameter.
|
# because of the following `extract_standard_markdown` parameter.
|
||||||
('extract_standard_markdown',
|
('extract_standard_markdown',
|
||||||
config_options.Type(dict, default={}))
|
config_options.Type(dict, default={})),
|
||||||
# If the `enable` key of this dict parameter is true
|
# If the `enable` key of this dict parameter is true
|
||||||
# (it defaults to the opposite of `copy_standard_markdown`),
|
# (it defaults to the opposite of `copy_standard_markdown`),
|
||||||
# it adds a semiliterate block causing extraction (and hence
|
# it adds a semiliterate block causing extraction (and hence
|
||||||
@ -333,6 +333,10 @@ terminate: '^\s*\)'
|
|||||||
# (which is also the default when `copy_standard_markdown` is true)
|
# (which is also the default when `copy_standard_markdown` is true)
|
||||||
# will prevent automatic extraction (and hence disable
|
# will prevent automatic extraction (and hence disable
|
||||||
# inclusion-directive processing) from standard Markdown files.
|
# inclusion-directive processing) from standard Markdown files.
|
||||||
|
('extract_on_copy',
|
||||||
|
config_options.Type(bool, default=False)),
|
||||||
|
# Whether to also attempt extraction from a file that is copied
|
||||||
|
# verbatim (because of matching the `include_extensions`).
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_config(self, config, **kwargs):
|
def on_config(self, config, **kwargs):
|
||||||
@ -365,6 +369,8 @@ terminate: '^\s*\)'
|
|||||||
def extract_from(self, from_directory, name, to_directory):
|
def extract_from(self, from_directory, name, to_directory):
|
||||||
if any(ext in name for ext in self.exclude_extensions):
|
if any(ext in name for ext in self.exclude_extensions):
|
||||||
return False
|
return False
|
||||||
|
if not self.config['extract_on_copy'] and self.in_extensions(name):
|
||||||
|
return False
|
||||||
return super().extract_from(from_directory, name, to_directory)
|
return super().extract_from(from_directory, name, to_directory)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = mkdocs-semiliterate
|
name = mkdocs-semiliterate
|
||||||
version = 0.3.0
|
version = 0.4.0
|
||||||
description = Extension of mkdocs-simple-plugin adding easy content inclusion
|
description = Extension of mkdocs-simple-plugin adding easy content inclusion
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
long_description_content_type = text/markdown
|
long_description_content_type = text/markdown
|
||||||
@ -25,7 +25,7 @@ license = Apache-2.0
|
|||||||
packages = mkdocs_semiliterate
|
packages = mkdocs_semiliterate
|
||||||
install_requires =
|
install_requires =
|
||||||
mkdocs
|
mkdocs
|
||||||
mkdocs-simple-plugin>=1.0.0
|
mkdocs-simple-plugin~=1.0
|
||||||
|
|
||||||
[options.entry_points]
|
[options.entry_points]
|
||||||
mkdocs.plugins =
|
mkdocs.plugins =
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
site
|
site
|
||||||
site/404.html
|
site/404.html
|
||||||
|
site/assets
|
||||||
|
site/assets/icons8-ask-question-100.png
|
||||||
site/css
|
site/css
|
||||||
site/css/theme.css
|
site/css/theme.css
|
||||||
site/css/theme_extra.css
|
site/css/theme_extra.css
|
||||||
|
6
tests/fixtures/extract-inclusion/README.md
vendored
Normal file
6
tests/fixtures/extract-inclusion/README.md
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Want to copy and extract
|
||||||
|
|
||||||
|
The [whole text](raw.txt).
|
||||||
|
|
||||||
|
The [extracted markdown](polished.md).
|
||||||
|
|
BIN
tests/fixtures/extract-inclusion/assets/icons8-ask-question-100.png
vendored
Normal file
BIN
tests/fixtures/extract-inclusion/assets/icons8-ask-question-100.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
12
tests/fixtures/extract-inclusion/mkdocs.yml
vendored
Normal file
12
tests/fixtures/extract-inclusion/mkdocs.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
site_name: Enable extraction from included files
|
||||||
|
docs_dir: refsite # dummy
|
||||||
|
plugins:
|
||||||
|
- semiliterate:
|
||||||
|
ignore_folders: [refsite]
|
||||||
|
merge_docs_dir: false
|
||||||
|
include_extensions: ['.txt']
|
||||||
|
extract_on_copy: true
|
||||||
|
semiliterate:
|
||||||
|
- pattern: '\.txt'
|
||||||
|
extract: {start: '---', stop: '---'}
|
||||||
|
destination: 'polished.md'
|
7
tests/fixtures/extract-inclusion/raw.txt
vendored
Normal file
7
tests/fixtures/extract-inclusion/raw.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
This is a free-form file, used as an example
|
||||||
|
---
|
||||||
|
# Internals
|
||||||
|
|
||||||
|
But this is __markdown__ hidden within.
|
||||||
|
---
|
||||||
|
There can of course be stuff after it.
|
104
tests/fixtures/extract-inclusion/refsite/404.html.cropped
vendored
Normal file
104
tests/fixtures/extract-inclusion/refsite/404.html.cropped
vendored
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Enable extraction from included files</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="/.">Enable extraction from included files</a>
|
||||||
|
<!-- Expander button -->
|
||||||
|
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Expanded navigation -->
|
||||||
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
||||||
|
<!-- Main navigation -->
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="navitem">
|
||||||
|
<a href="/." class="nav-link">Want to copy and extract</a>
|
||||||
|
</li>
|
||||||
|
<li class="navitem">
|
||||||
|
<a href="/polished/" class="nav-link">Internals</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav navbar-nav ml-auto">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div id="main-content" class="span12">
|
||||||
|
<h1 id="404-page-not-found" style="text-align: center">404</h1>
|
||||||
|
<p style="text-align: center"><strong>Page not found</strong></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="col-md-12">
|
||||||
|
<hr>
|
||||||
|
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||||
|
</footer>
|
||||||
|
var base_url = "/",
|
||||||
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||||
|
|
||||||
|
<div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 20%;">Keys</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="help shortcut"><kbd>?</kbd></td>
|
||||||
|
<td>Open this help</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="next shortcut"><kbd>n</kbd></td>
|
||||||
|
<td>Next page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
||||||
|
<td>Previous page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="search shortcut"><kbd>s</kbd></td>
|
||||||
|
<td>Search</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
318
tests/fixtures/extract-inclusion/refsite/css/base.css
vendored
Normal file
318
tests/fixtures/extract-inclusion/refsite/css/base.css
vendored
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
html {
|
||||||
|
/* csslint ignore:start */
|
||||||
|
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||||
|
main container. */
|
||||||
|
scroll-padding-top: calc(3.5rem + 20px);
|
||||||
|
/* csslint ignore:end */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Replacement for `body { background-attachment: fixed; }`, which has
|
||||||
|
performance issues when scrolling on large displays. See #1394. */
|
||||||
|
body::before {
|
||||||
|
content: ' ';
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
background: url(../img/grid.png) repeat-x;
|
||||||
|
will-change: transform;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > .container {
|
||||||
|
margin-top: 20px;
|
||||||
|
min-height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar.fixed-top { /* csslint allow: adjoining-classes */
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-links {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-9 img {
|
||||||
|
max-width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 20px auto 30px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6 {
|
||||||
|
color: #444;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre, .rst-content tt {
|
||||||
|
max-width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border: solid 1px #e1e4e5;
|
||||||
|
color: #333;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.code-large, .rst-content tt.code-large {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 2px 5px;
|
||||||
|
background: #fff;
|
||||||
|
border: solid 1px #e1e4e5;
|
||||||
|
color: #333;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
display: block;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal;
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 90%;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #333;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||||
|
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
a code {
|
||||||
|
color: #2FA4E7;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover code, a:focus code {
|
||||||
|
color: #157AB5;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-dialog {
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Side navigation
|
||||||
|
*
|
||||||
|
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
|
||||||
|
* sections of docs content.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bs-sidebar.affix { /* csslint allow: adjoining-classes */
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||||
|
main container. */
|
||||||
|
top: calc(3.5rem + 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar.card { /* csslint allow: adjoining-classes */
|
||||||
|
padding: 0;
|
||||||
|
max-height: 90%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toggle (vertically flip) sidebar collapse icon */
|
||||||
|
.bs-sidebar .navbar-toggler span {
|
||||||
|
-moz-transform: scale(1, -1);
|
||||||
|
-webkit-transform: scale(1, -1);
|
||||||
|
-o-transform: scale(1, -1);
|
||||||
|
-ms-transform: scale(1, -1);
|
||||||
|
transform: scale(1, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .navbar-toggler.collapsed span { /* csslint allow: adjoining-classes */
|
||||||
|
-moz-transform: scale(1, 1);
|
||||||
|
-webkit-transform: scale(1, 1);
|
||||||
|
-o-transform: scale(1, 1);
|
||||||
|
-ms-transform: scale(1, 1);
|
||||||
|
transform: scale(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* First level of nav */
|
||||||
|
.bs-sidebar > .navbar-collapse > .nav {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All levels of nav */
|
||||||
|
.bs-sidebar .nav > li > a {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 20px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.bs-sidebar .nav > li > a:hover,
|
||||||
|
.bs-sidebar .nav > li > a:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
border-right: 1px solid;
|
||||||
|
}
|
||||||
|
.bs-sidebar .nav > li > a.active,
|
||||||
|
.bs-sidebar .nav > li > a.active:hover,
|
||||||
|
.bs-sidebar .nav > li > a.active:focus {
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: transparent;
|
||||||
|
border-right: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav .nav .nav {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav > li > a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav .nav > li > a {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerlink {
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-size: 14px;
|
||||||
|
display: none;
|
||||||
|
padding-left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink{
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.admonition {
|
||||||
|
padding: 15px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.note { /* csslint allow: adjoining-classes */
|
||||||
|
color: #3a87ad;
|
||||||
|
background-color: #d9edf7;
|
||||||
|
border-color: #bce8f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.warning { /* csslint allow: adjoining-classes */
|
||||||
|
color: #c09853;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
border-color: #fbeed5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.danger { /* csslint allow: adjoining-classes */
|
||||||
|
color: #b94a48;
|
||||||
|
background-color: #f2dede;
|
||||||
|
border-color: #eed3d7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition-title {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991.98px) {
|
||||||
|
.navbar-collapse.show { /* csslint allow: adjoining-classes */
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: calc(100vh - 3.5rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-item.open { /* csslint allow: adjoining-classes */
|
||||||
|
color: #fff;
|
||||||
|
background-color: #2FA4E7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > .dropdown-menu {
|
||||||
|
margin: 0 0 0 1.5rem;
|
||||||
|
padding: 0;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > a::after {
|
||||||
|
display: block;
|
||||||
|
content: " ";
|
||||||
|
float: right;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 5px 0 5px 5px;
|
||||||
|
border-left-color: #ccc;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu:hover > a::after {
|
||||||
|
border-left-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.dropdown-menu {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: calc(100vh - 3.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > .dropdown-menu {
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: fixed !important;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
margin-top: -9px;
|
||||||
|
margin-left: -2px;
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu.pull-left { /* csslint allow: adjoining-classes */
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu.pull-left > .dropdown-menu { /* csslint allow: adjoining-classes */
|
||||||
|
left: -100%;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
/* Remove sidebar when print */
|
||||||
|
.col-md-3 { display: none; }
|
||||||
|
}
|
12
tests/fixtures/extract-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
12
tests/fixtures/extract-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
tests/fixtures/extract-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
4
tests/fixtures/extract-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
131
tests/fixtures/extract-inclusion/refsite/index.html.cropped
vendored
Normal file
131
tests/fixtures/extract-inclusion/refsite/index.html.cropped
vendored
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="None">
|
||||||
|
|
||||||
|
|
||||||
|
<title>Enable extraction from included files</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="homepage">
|
||||||
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href=".">Enable extraction from included files</a>
|
||||||
|
<!-- Expander button -->
|
||||||
|
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Expanded navigation -->
|
||||||
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
||||||
|
<!-- Main navigation -->
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="navitem active">
|
||||||
|
<a href="." class="nav-link">Want to copy and extract</a>
|
||||||
|
</li>
|
||||||
|
<li class="navitem">
|
||||||
|
<a href="polished/" class="nav-link">Internals</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav navbar-nav ml-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a rel="prev" class="nav-link disabled">
|
||||||
|
<i class="fa fa-arrow-left"></i> Previous
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a rel="next" href="polished/" class="nav-link">
|
||||||
|
Next <i class="fa fa-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
|
||||||
|
<span class="fa fa-angle-down"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
|
||||||
|
<li class="nav-item" data-level="1"><a href="#want-to-copy-and-extract" class="nav-link">Want to copy and extract</a>
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div></div>
|
||||||
|
<div class="col-md-9" role="main">
|
||||||
|
|
||||||
|
<h1 id="want-to-copy-and-extract">Want to copy and extract</h1>
|
||||||
|
<p>The <a href="raw.txt">whole text</a>.</p>
|
||||||
|
<p>The <a href="polished/">extracted markdown</a>.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="col-md-12">
|
||||||
|
<hr>
|
||||||
|
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||||
|
</footer>
|
||||||
|
var base_url = ".",
|
||||||
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||||
|
|
||||||
|
<div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 20%;">Keys</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="help shortcut"><kbd>?</kbd></td>
|
||||||
|
<td>Open this help</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="next shortcut"><kbd>n</kbd></td>
|
||||||
|
<td>Next page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
||||||
|
<td>Previous page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="search shortcut"><kbd>s</kbd></td>
|
||||||
|
<td>Search</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
-->
|
127
tests/fixtures/extract-inclusion/refsite/polished/index.html.cropped
vendored
Normal file
127
tests/fixtures/extract-inclusion/refsite/polished/index.html.cropped
vendored
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Internals - Enable extraction from included files</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="..">Enable extraction from included files</a>
|
||||||
|
<!-- Expander button -->
|
||||||
|
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Expanded navigation -->
|
||||||
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
||||||
|
<!-- Main navigation -->
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="navitem">
|
||||||
|
<a href=".." class="nav-link">Want to copy and extract</a>
|
||||||
|
</li>
|
||||||
|
<li class="navitem active">
|
||||||
|
<a href="./" class="nav-link">Internals</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav navbar-nav ml-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a rel="prev" href=".." class="nav-link">
|
||||||
|
<i class="fa fa-arrow-left"></i> Previous
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a rel="next" class="nav-link disabled">
|
||||||
|
Next <i class="fa fa-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
|
||||||
|
<span class="fa fa-angle-down"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
|
||||||
|
<li class="nav-item" data-level="1"><a href="#internals" class="nav-link">Internals</a>
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div></div>
|
||||||
|
<div class="col-md-9" role="main">
|
||||||
|
|
||||||
|
<h1 id="internals">Internals</h1>
|
||||||
|
<p>But this is <strong>markdown</strong> hidden within.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="col-md-12">
|
||||||
|
<hr>
|
||||||
|
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||||
|
</footer>
|
||||||
|
var base_url = "..",
|
||||||
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||||
|
|
||||||
|
<div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 20%;">Keys</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="help shortcut"><kbd>?</kbd></td>
|
||||||
|
<td>Open this help</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="next shortcut"><kbd>n</kbd></td>
|
||||||
|
<td>Next page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
||||||
|
<td>Previous page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="search shortcut"><kbd>s</kbd></td>
|
||||||
|
<td>Search</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
7
tests/fixtures/extract-inclusion/refsite/raw.txt
vendored
Normal file
7
tests/fixtures/extract-inclusion/refsite/raw.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
This is a free-form file, used as an example
|
||||||
|
---
|
||||||
|
# Internals
|
||||||
|
|
||||||
|
But this is __markdown__ hidden within.
|
||||||
|
---
|
||||||
|
There can of course be stuff after it.
|
3
tests/fixtures/no-extract-inclusion/README.md
vendored
Normal file
3
tests/fixtures/no-extract-inclusion/README.md
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Just want the image
|
||||||
|
|
||||||
|
It's a dream: ![Dreamy question](assets/icons8-ask-question-100.png)
|
BIN
tests/fixtures/no-extract-inclusion/assets/icons8-ask-question-100.png
vendored
Normal file
BIN
tests/fixtures/no-extract-inclusion/assets/icons8-ask-question-100.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
6
tests/fixtures/no-extract-inclusion/mkdocs.yml
vendored
Normal file
6
tests/fixtures/no-extract-inclusion/mkdocs.yml
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
site_name: Do not extract from included files
|
||||||
|
docs_dir: refsite # dummy
|
||||||
|
plugins:
|
||||||
|
- semiliterate:
|
||||||
|
ignore_folders: [refsite]
|
||||||
|
merge_docs_dir: false
|
91
tests/fixtures/no-extract-inclusion/refsite/404.html.cropped
vendored
Normal file
91
tests/fixtures/no-extract-inclusion/refsite/404.html.cropped
vendored
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Do not extract from included files</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="/.">Do not extract from included files</a>
|
||||||
|
|
||||||
|
<!-- Expanded navigation -->
|
||||||
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
||||||
|
|
||||||
|
<ul class="nav navbar-nav ml-auto">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div id="main-content" class="span12">
|
||||||
|
<h1 id="404-page-not-found" style="text-align: center">404</h1>
|
||||||
|
<p style="text-align: center"><strong>Page not found</strong></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="col-md-12">
|
||||||
|
<hr>
|
||||||
|
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||||
|
</footer>
|
||||||
|
var base_url = "/",
|
||||||
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||||
|
|
||||||
|
<div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 20%;">Keys</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="help shortcut"><kbd>?</kbd></td>
|
||||||
|
<td>Open this help</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="next shortcut"><kbd>n</kbd></td>
|
||||||
|
<td>Next page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
||||||
|
<td>Previous page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="search shortcut"><kbd>s</kbd></td>
|
||||||
|
<td>Search</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
tests/fixtures/no-extract-inclusion/refsite/assets/icons8-ask-question-100.png
vendored
Normal file
BIN
tests/fixtures/no-extract-inclusion/refsite/assets/icons8-ask-question-100.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
318
tests/fixtures/no-extract-inclusion/refsite/css/base.css
vendored
Normal file
318
tests/fixtures/no-extract-inclusion/refsite/css/base.css
vendored
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
html {
|
||||||
|
/* csslint ignore:start */
|
||||||
|
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||||
|
main container. */
|
||||||
|
scroll-padding-top: calc(3.5rem + 20px);
|
||||||
|
/* csslint ignore:end */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Replacement for `body { background-attachment: fixed; }`, which has
|
||||||
|
performance issues when scrolling on large displays. See #1394. */
|
||||||
|
body::before {
|
||||||
|
content: ' ';
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
background: url(../img/grid.png) repeat-x;
|
||||||
|
will-change: transform;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
body > .container {
|
||||||
|
margin-top: 20px;
|
||||||
|
min-height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar.fixed-top { /* csslint allow: adjoining-classes */
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-links {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-md-9 img {
|
||||||
|
max-width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 20px auto 30px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2, h3, h4, h5, h6 {
|
||||||
|
color: #444;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre, .rst-content tt {
|
||||||
|
max-width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border: solid 1px #e1e4e5;
|
||||||
|
color: #333;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.code-large, .rst-content tt.code-large {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 2px 5px;
|
||||||
|
background: #fff;
|
||||||
|
border: solid 1px #e1e4e5;
|
||||||
|
color: #333;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
display: block;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal;
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
kbd {
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: 90%;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #333;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||||
|
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
a code {
|
||||||
|
color: #2FA4E7;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover code, a:focus code {
|
||||||
|
color: #157AB5;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-dialog {
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Side navigation
|
||||||
|
*
|
||||||
|
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
|
||||||
|
* sections of docs content.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.bs-sidebar.affix { /* csslint allow: adjoining-classes */
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
|
||||||
|
main container. */
|
||||||
|
top: calc(3.5rem + 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar.card { /* csslint allow: adjoining-classes */
|
||||||
|
padding: 0;
|
||||||
|
max-height: 90%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toggle (vertically flip) sidebar collapse icon */
|
||||||
|
.bs-sidebar .navbar-toggler span {
|
||||||
|
-moz-transform: scale(1, -1);
|
||||||
|
-webkit-transform: scale(1, -1);
|
||||||
|
-o-transform: scale(1, -1);
|
||||||
|
-ms-transform: scale(1, -1);
|
||||||
|
transform: scale(1, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .navbar-toggler.collapsed span { /* csslint allow: adjoining-classes */
|
||||||
|
-moz-transform: scale(1, 1);
|
||||||
|
-webkit-transform: scale(1, 1);
|
||||||
|
-o-transform: scale(1, 1);
|
||||||
|
-ms-transform: scale(1, 1);
|
||||||
|
transform: scale(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* First level of nav */
|
||||||
|
.bs-sidebar > .navbar-collapse > .nav {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All levels of nav */
|
||||||
|
.bs-sidebar .nav > li > a {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 20px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.bs-sidebar .nav > li > a:hover,
|
||||||
|
.bs-sidebar .nav > li > a:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
border-right: 1px solid;
|
||||||
|
}
|
||||||
|
.bs-sidebar .nav > li > a.active,
|
||||||
|
.bs-sidebar .nav > li > a.active:hover,
|
||||||
|
.bs-sidebar .nav > li > a.active:focus {
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: transparent;
|
||||||
|
border-right: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav .nav .nav {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav > li > a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-sidebar .nav .nav > li > a {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerlink {
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-size: 14px;
|
||||||
|
display: none;
|
||||||
|
padding-left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink{
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.admonition {
|
||||||
|
padding: 15px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.note { /* csslint allow: adjoining-classes */
|
||||||
|
color: #3a87ad;
|
||||||
|
background-color: #d9edf7;
|
||||||
|
border-color: #bce8f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.warning { /* csslint allow: adjoining-classes */
|
||||||
|
color: #c09853;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
border-color: #fbeed5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition.danger { /* csslint allow: adjoining-classes */
|
||||||
|
color: #b94a48;
|
||||||
|
background-color: #f2dede;
|
||||||
|
border-color: #eed3d7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admonition-title {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991.98px) {
|
||||||
|
.navbar-collapse.show { /* csslint allow: adjoining-classes */
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: calc(100vh - 3.5rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-item.open { /* csslint allow: adjoining-classes */
|
||||||
|
color: #fff;
|
||||||
|
background-color: #2FA4E7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > .dropdown-menu {
|
||||||
|
margin: 0 0 0 1.5rem;
|
||||||
|
padding: 0;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > a::after {
|
||||||
|
display: block;
|
||||||
|
content: " ";
|
||||||
|
float: right;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 5px 0 5px 5px;
|
||||||
|
border-left-color: #ccc;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu:hover > a::after {
|
||||||
|
border-left-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.dropdown-menu {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: calc(100vh - 3.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu > .dropdown-menu {
|
||||||
|
/* csslint ignore:start */
|
||||||
|
position: fixed !important;
|
||||||
|
/* csslint ignore:end */
|
||||||
|
margin-top: -9px;
|
||||||
|
margin-left: -2px;
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu.pull-left { /* csslint allow: adjoining-classes */
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-submenu.pull-left > .dropdown-menu { /* csslint allow: adjoining-classes */
|
||||||
|
left: -100%;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
/* Remove sidebar when print */
|
||||||
|
.col-md-3 { display: none; }
|
||||||
|
}
|
12
tests/fixtures/no-extract-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
12
tests/fixtures/no-extract-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
tests/fixtures/no-extract-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
4
tests/fixtures/no-extract-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
107
tests/fixtures/no-extract-inclusion/refsite/index.html.cropped
vendored
Normal file
107
tests/fixtures/no-extract-inclusion/refsite/index.html.cropped
vendored
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="None">
|
||||||
|
|
||||||
|
|
||||||
|
<title>Do not extract from included files</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="homepage">
|
||||||
|
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href=".">Do not extract from included files</a>
|
||||||
|
|
||||||
|
<!-- Expanded navigation -->
|
||||||
|
<div id="navbar-collapse" class="navbar-collapse collapse">
|
||||||
|
|
||||||
|
<ul class="nav navbar-nav ml-auto">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
|
||||||
|
<span class="fa fa-angle-down"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
|
||||||
|
<li class="nav-item" data-level="1"><a href="#just-want-the-image" class="nav-link">Just want the image</a>
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div></div>
|
||||||
|
<div class="col-md-9" role="main">
|
||||||
|
|
||||||
|
<h1 id="just-want-the-image">Just want the image</h1>
|
||||||
|
<p>It's a dream: <img alt="Dreamy question" src="assets/icons8-ask-question-100.png" /></p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="col-md-12">
|
||||||
|
<hr>
|
||||||
|
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||||
|
</footer>
|
||||||
|
var base_url = ".",
|
||||||
|
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||||
|
|
||||||
|
<div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 20%;">Keys</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="help shortcut"><kbd>?</kbd></td>
|
||||||
|
<td>Open this help</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="next shortcut"><kbd>n</kbd></td>
|
||||||
|
<td>Next page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="prev shortcut"><kbd>p</kbd></td>
|
||||||
|
<td>Previous page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="search shortcut"><kbd>s</kbd></td>
|
||||||
|
<td>Search</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
-->
|
@ -4,7 +4,7 @@ startdir=$PWD
|
|||||||
for file in tests/fixtures/*
|
for file in tests/fixtures/*
|
||||||
do
|
do
|
||||||
cd "$startdir/$file"
|
cd "$startdir/$file"
|
||||||
mkdocs -v build
|
mkdocs -v build -s
|
||||||
# unfortunately MkDocs writes the run date in the last few lines of index
|
# unfortunately MkDocs writes the run date in the last few lines of index
|
||||||
# and has version numbers in some of the scripts that are irrelevant:
|
# and has version numbers in some of the scripts that are irrelevant:
|
||||||
for hml in **/*.html
|
for hml in **/*.html
|
||||||
|
Loading…
Reference in New Issue
Block a user