test: add Drone tests
Also includes installation and development documentation, and updates to the latest development version of mkdocs-simple-plugin. Resolves #3.
This commit is contained in:
parent
ea8e65ae64
commit
2235af160c
90
.drone.yml
Normal file
90
.drone.yml
Normal file
@ -0,0 +1,90 @@
|
||||
---
|
||||
### develop
|
||||
# ## Developing
|
||||
#
|
||||
# You can clone the repository with
|
||||
# ```
|
||||
# git clone https://code.studioinfinity.org/glen/mkdocs-semiliterate
|
||||
# ```
|
||||
###
|
||||
kind: pipeline
|
||||
name: bootstrap
|
||||
steps:
|
||||
- name: build_install_test
|
||||
image: python
|
||||
commands:
|
||||
- python --version
|
||||
- pwd
|
||||
- pip install flake8
|
||||
- cd ..
|
||||
### install
|
||||
# ## Installation
|
||||
#
|
||||
# At the moment, `semiliterate` relies on the latest pre-release version of
|
||||
# `mkdocs-simple-plugin`. Therefore, you must clone and install that repository
|
||||
# before installing `semiliterate`.
|
||||
# ```
|
||||
- git clone https://github.com/athackst/mkdocs-simple-plugin.git
|
||||
- cd mkdocs-simple-plugin
|
||||
- pip install .
|
||||
# ```
|
||||
# Once that's in place, you can install semiliterate; right now as there has
|
||||
# not yet been a release, you should do that by cloning and installing as well:
|
||||
# ```
|
||||
# git clone https://code.studioinfinity.org/glen/mkdocs-semiliterate
|
||||
# cd mkdocs-semiliterate
|
||||
# pip install .
|
||||
# ```
|
||||
###
|
||||
- cd ../src
|
||||
### develop
|
||||
# You can build the distribution with
|
||||
# ```
|
||||
- pip install pep517
|
||||
- python -m pep517.build .
|
||||
# ```
|
||||
# That will produce a `.whl` file in the `dist` subdirectory.
|
||||
###
|
||||
- pip install dist/mkdocs_semiliterate*.whl
|
||||
### develop
|
||||
# ### Testing
|
||||
#
|
||||
# If you have a a Docker daemon running on your local machine and the Drone
|
||||
# [command-line](https://readme.drone.io/cli/install) installed, you can run all
|
||||
# of the tests via `drone exec`. If not, or if you don't want to wait for the
|
||||
# Docker container to spin up and install all of the prerequisites, you can make
|
||||
# sure you have the version of mkdocs-semiliterate that you want to test
|
||||
# currently properly installed in the python you are currently running, and then
|
||||
# starting from the top-level `mkdocs-semiliterate` directory, run the commands
|
||||
# that drone uses to test:
|
||||
# ```
|
||||
- flake8 --max-line-length=80 --extend-exclude=build
|
||||
- mkdocs build
|
||||
- find site -not -path '*fonts*' -not -path '*img*' -not -path '*js*' | sort -f | diff tests/bootstrap.manifest -
|
||||
- cd tests/fixtures/recursive-inclusion
|
||||
- mkdocs build
|
||||
# unfortunately MkDocs writes the run date in the last few lines of index:
|
||||
- head -n -3 site/index.html > site/croppedindex.html
|
||||
- rm site/index.html
|
||||
- diff -r -x img -x fonts -x js -x '*.gz' refsite site
|
||||
# ```
|
||||
# All of the commands should succeed and none of the diffs should produce any
|
||||
# output.
|
||||
###
|
||||
- rm -r site
|
||||
- name: validate
|
||||
image: klakegg/html-proofer:latest
|
||||
volumes:
|
||||
- site: /src
|
||||
command: ['--url-ignore', 'https://fonts.gstatic.com', '--allow-hash-href',
|
||||
'--file-ignore', './site/404.html,/.*tests.*/']
|
||||
|
||||
### develop
|
||||
# ### Contributing
|
||||
#
|
||||
# You can report issues at the
|
||||
# [repository site](https://code.studioinfinity.org/glen/mkdocs-semiliterate).
|
||||
# Pull requests are welcome as well. If you're new to contributing to open-source
|
||||
# projects, `mkdocs-simple-plugin` has a very nice
|
||||
# [tutorial](https://athackst.github.io/mkdocs-simple-plugin/CONTRIBUTING/).
|
||||
###
|
@ -1,6 +1,6 @@
|
||||
# MkDocs semiliterate Plugin
|
||||
|
||||
This plugin for MkDocs is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://athackst.github.io/mkdocs-simple-plugin). It adds `{! ... !}` syntax for including content from one file into another (and a couple of other small usability tweaks).
|
||||
This plugin for MkDocs is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://athackst.github.io/mkdocs-simple-plugin). It adds `{! ... !}` syntax for including content from one file into another (and a couple of other small ease-of-use tweaks).
|
||||
|
||||
## Rationale
|
||||
|
||||
@ -12,10 +12,6 @@ The mkdocs-simple-plugin goes a long way toward creating a semiliterate programm
|
||||
|
||||
With a few other small ease-of-use tweaks (documented in the Usage section), this extended plugin aims to produce a lightweight but comprehensive semiliterate programming environment. <!-- repo: -->The<!-- site:This --> documentation site is, of course, produced by MkDocs using the semiliterate plugin.
|
||||
|
||||
## Installation
|
||||
|
||||
To be written.
|
||||
|
||||
## License
|
||||
|
||||
This software is licensed under [Apache 2.0](LICENSE).
|
||||
|
14
mkdocs.yml
14
mkdocs.yml
@ -1,12 +1,14 @@
|
||||
site_name: MkDocs semiliterate plugin
|
||||
nav:
|
||||
- Overview: README.md
|
||||
- Installation: drone_install.md
|
||||
- Usage: mkdocs_semiliterate/plugin.md
|
||||
- Developing: drone_develop.md
|
||||
plugins:
|
||||
- search
|
||||
- semiliterate:
|
||||
merge_docs_dir: false
|
||||
ignore_folders: [dist, build]
|
||||
ignore_folders: [build, dist, tests]
|
||||
include_extensions: [LICENSE]
|
||||
semiliterate:
|
||||
- pattern: '(\.md)$'
|
||||
@ -15,6 +17,16 @@ plugins:
|
||||
- pattern: '(\.py)$'
|
||||
start: '"""\smd'
|
||||
stop: '"""'
|
||||
- pattern: '.drone.yml'
|
||||
destination: 'drone_develop.md'
|
||||
start: '### develop'
|
||||
stop: '^\s*###'
|
||||
replace: ['^# (.*\s*)$', '^\s*-(.*\s*)$']
|
||||
- pattern: '.drone.yml'
|
||||
destination: 'drone_install.md'
|
||||
start: '### install'
|
||||
stop: '^\s*###'
|
||||
replace: ['^# (.*\s*)$', '^\s*-(.*\s*)$']
|
||||
markdown_extensions:
|
||||
- abbr
|
||||
- def_list
|
||||
|
@ -1,11 +1,11 @@
|
||||
""" md
|
||||
## Usage
|
||||
|
||||
Once this plugin is [installed](../README.md#installation), in your `mkdocs.yml`
|
||||
Once this plugin is [installed](../drone_install.md), in your `mkdocs.yml`
|
||||
file just replace the plugin name `simple` with `semiliterate`. It accepts all
|
||||
of the same parameters, so `mkdocs` will still work as before, and
|
||||
you will have immediate access to all of the following extensions. (Note that this
|
||||
documentation assumes a familiarity with the
|
||||
you will have immediate access to all of the following extensions. (Note that
|
||||
this documentation assumes a familiarity with the
|
||||
[usage](https://athackst.github.io/mkdocs-simple-plugin/mkdocs_simple_plugin/plugin/)
|
||||
of the `simple` plugin.)
|
||||
"""
|
||||
@ -45,7 +45,7 @@ normally copy. That is, it does not examine lines before the `start` regexp
|
||||
is encountered, or after the `terminate` regexp, or between instances of
|
||||
`stop` and `start`. It also doesn't check any text written from lines that
|
||||
match these special expressions. Moreover, on such normally-transcribed lines,
|
||||
it's the text **after** the application of any semiliterate replacements that
|
||||
it's the text **after** the application of any semiliterate `replace`ments that
|
||||
is checked for `{! ... !}`.
|
||||
"""
|
||||
|
||||
@ -92,11 +92,11 @@ is checked for `{! ... !}`.
|
||||
|
||||
|
||||
class SemiliteratePlugin(SimplePlugin):
|
||||
""" md An extension of the mkdocs-simple-plugin
|
||||
r""" md An extension of the mkdocs-simple-plugin
|
||||
### Additional plugin parameters
|
||||
|
||||
`semiliterate` adds a couple of new plugin parameters to further tailor its
|
||||
behavior as compared to `simple`. They are described in this section, with their
|
||||
behavior as compared to `simple`. They are described in this section, with
|
||||
default values in parentheses at the beginning of each entry.
|
||||
|
||||
{! plugin.py ---
|
||||
@ -122,14 +122,14 @@ extract_standard_markdown
|
||||
# because of the `extract_standard_markdown` default.
|
||||
)
|
||||
|
||||
def copy_doc_files(self, destination_directory):
|
||||
def build_docs(self):
|
||||
if not self.config['copy_standard_markdown']:
|
||||
self.include_extensions = self.config['include_extensions']
|
||||
return super().copy_doc_files(destination_directory)
|
||||
return super().build_docs()
|
||||
|
||||
## FIXME: This method is copied from simple, just to insert a control
|
||||
## over what class is used to do the extraction. Try to get this inserted as
|
||||
## the method of the same name in simple.
|
||||
# FIXME: This method is copied from simple, just to insert a control
|
||||
# over what class is used to do the extraction. Try to get this inserted as
|
||||
# the method of the same name in simple.
|
||||
def extract_from(self, from_directory, name, destination_directory):
|
||||
"""Extract content from the file in _from_directory_ named _name_
|
||||
to a file or files in _destination_directory_, as specified by
|
||||
@ -140,15 +140,22 @@ extract_standard_markdown
|
||||
for item in self.semiliterate:
|
||||
name_match = item['pattern'].search(name)
|
||||
if name_match:
|
||||
new_name = (name[:name_match.start(name_match.lastindex)]
|
||||
+ '.md'
|
||||
+ name[name_match.end(name_match.lastindex):])
|
||||
new_name = ''
|
||||
if name_match.lastindex:
|
||||
new_name = (name[:name_match.start(name_match.lastindex)]
|
||||
+ '.md'
|
||||
+ name[name_match.end(name_match.lastindex):])
|
||||
if 'destination' in item:
|
||||
new_name = name_match.expand(item['destination'])
|
||||
if not new_name:
|
||||
raise LookupError(
|
||||
"mkdocs-simple-plugin: No last group in match of"
|
||||
+ "{} to {} and no destination".format(
|
||||
item['pattern'], name))
|
||||
new_file = LazyFile(destination_directory, new_name)
|
||||
with open(original) as original_file:
|
||||
utils.log.debug(
|
||||
"mkdocs-simple-plugin: Scanning {} ...".format(original))
|
||||
"mkdocs-simple-plugin: Scanning {}...".format(original))
|
||||
productive = self.try_extraction(
|
||||
original_file, from_directory, new_file, **item)
|
||||
new_file.close()
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = mkdocs-semiliterate
|
||||
version = 0.0.4
|
||||
version = 0.0.5
|
||||
|
||||
[options]
|
||||
packages = mkdocs_semiliterate
|
||||
|
3
tests/fixtures/recursive-inclusion/README.md
vendored
Normal file
3
tests/fixtures/recursive-inclusion/README.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# More complex semiliterate site
|
||||
|
||||
This site will involve custom extraction and inclusion.
|
9
tests/fixtures/recursive-inclusion/baz.qux
vendored
Normal file
9
tests/fixtures/recursive-inclusion/baz.qux
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
I'd like you to know that
|
||||
really just about anything can go up here.
|
||||
START right here, because everything else on this line is ignored:
|
||||
| file
|
||||
in{! xyzzy start: '(.*)' !}ion
|
||||
STOP that distraction!
|
||||
Now we can get back to our originally
|
||||
scheduled qux.
|
||||
Thanks very much!
|
27
tests/fixtures/recursive-inclusion/foo.bar
vendored
Normal file
27
tests/fixtures/recursive-inclusion/foo.bar
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Description: This is a hypothetical file of the bar language
|
||||
Explanation: It doesn't really make sense
|
||||
---
|
||||
## Exposition
|
||||
|
||||
However, we can use it to test custom extraction
|
||||
---
|
||||
|
||||
Information: This is a supposed "source code" section.
|
||||
Point: This should be ignored by semiliterate extraction.
|
||||
|
||||
---
|
||||
And other features, such as extraction resumption.
|
||||
|
||||
Not to mention{! baz.qux start: START
|
||||
terminate: STOP
|
||||
replace: ['^\|(.*)$'] !}syntax and `{! escaped syntax !}`.
|
||||
---
|
||||
|
||||
Unfortunate: the bar language has no real structure
|
||||
|
||||
!!!
|
||||
|
||||
---
|
||||
But at least this stuff down here will go ignored
|
||||
|
||||
|
5
tests/fixtures/recursive-inclusion/foo.grepout
vendored
Normal file
5
tests/fixtures/recursive-inclusion/foo.grepout
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<p>However, we can use it to test custom extraction
|
||||
And other features, such as extraction resumption.</p>
|
||||
<p>Not to mention file inclusion
|
||||
syntax and <code>{! escaped syntax !}</code>.</p></div>
|
||||
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
15
tests/fixtures/recursive-inclusion/mkdocs.yml
vendored
Normal file
15
tests/fixtures/recursive-inclusion/mkdocs.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
site_name: Custom semiliterate
|
||||
docs_dir: refsite # dummy
|
||||
plugins:
|
||||
- semiliterate:
|
||||
ignore_folders: [refsite]
|
||||
merge_docs_dir: false
|
||||
copy_standard_markdown: true
|
||||
semiliterate:
|
||||
- pattern: '(\.bar)$'
|
||||
start: '---'
|
||||
stop: '---'
|
||||
terminate: '!!!'
|
||||
nav:
|
||||
- About: README.md
|
||||
- Details: foo.md
|
116
tests/fixtures/recursive-inclusion/refsite/404.html
vendored
Normal file
116
tests/fixtures/recursive-inclusion/refsite/404.html
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
<!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">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/img/favicon.ico">
|
||||
<title>Custom semiliterate</title>
|
||||
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="/css/base.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
|
||||
<script src="/js/jquery-1.10.2.min.js" defer></script>
|
||||
<script src="/js/bootstrap.min.js" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/.">Custom semiliterate</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">About</a>
|
||||
</li>
|
||||
<li class="navitem">
|
||||
<a href="/foo/" class="nav-link">Details</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>
|
||||
<script>
|
||||
var base_url = "/",
|
||||
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||
</script>
|
||||
<script src="/js/base.js" defer></script>
|
||||
|
||||
<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>
|
141
tests/fixtures/recursive-inclusion/refsite/croppedindex.html
vendored
Normal file
141
tests/fixtures/recursive-inclusion/refsite/croppedindex.html
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
<!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">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="img/favicon.ico">
|
||||
<title>Custom semiliterate</title>
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="css/base.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
|
||||
<script src="js/jquery-1.10.2.min.js" defer></script>
|
||||
<script src="js/bootstrap.min.js" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
|
||||
<body class="homepage">
|
||||
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href=".">Custom semiliterate</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">About</a>
|
||||
</li>
|
||||
<li class="navitem">
|
||||
<a href="foo/" class="nav-link">Details</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="foo/" 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="#more-complex-semiliterate-site" class="nav-link">More complex semiliterate site</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div></div>
|
||||
<div class="col-md-9" role="main">
|
||||
|
||||
<h1 id="more-complex-semiliterate-site">More complex semiliterate site</h1>
|
||||
<p>This site will involve custom extraction and inclusion.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="col-md-12">
|
||||
<hr>
|
||||
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||
</footer>
|
||||
<script>
|
||||
var base_url = ".",
|
||||
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||
</script>
|
||||
<script src="js/base.js" defer></script>
|
||||
|
||||
<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>
|
||||
|
||||
<!--
|
313
tests/fixtures/recursive-inclusion/refsite/css/base.css
vendored
Normal file
313
tests/fixtures/recursive-inclusion/refsite/css/base.css
vendored
Normal file
@ -0,0 +1,313 @@
|
||||
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;
|
||||
}
|
||||
}
|
12
tests/fixtures/recursive-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
12
tests/fixtures/recursive-inclusion/refsite/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
tests/fixtures/recursive-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
4
tests/fixtures/recursive-inclusion/refsite/css/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
142
tests/fixtures/recursive-inclusion/refsite/foo/index.html
vendored
Normal file
142
tests/fixtures/recursive-inclusion/refsite/foo/index.html
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
<!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">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../img/favicon.ico">
|
||||
<title>Details - Custom semiliterate</title>
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="../css/base.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
|
||||
<script src="../js/jquery-1.10.2.min.js" defer></script>
|
||||
<script src="../js/bootstrap.min.js" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="..">Custom semiliterate</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">About</a>
|
||||
</li>
|
||||
<li class="navitem active">
|
||||
<a href="./" class="nav-link">Details</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="2"><a href="#exposition" class="nav-link">Exposition</a>
|
||||
<ul class="nav flex-column">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div></div>
|
||||
<div class="col-md-9" role="main">
|
||||
|
||||
<h2 id="exposition">Exposition</h2>
|
||||
<p>However, we can use it to test custom extraction
|
||||
And other features, such as extraction resumption.</p>
|
||||
<p>Not to mention file inclusion
|
||||
syntax and <code>{! escaped syntax !}</code>.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="col-md-12">
|
||||
<hr>
|
||||
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
|
||||
</footer>
|
||||
<script>
|
||||
var base_url = "..",
|
||||
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
|
||||
</script>
|
||||
<script src="../js/base.js" defer></script>
|
||||
|
||||
<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>
|
11
tests/fixtures/recursive-inclusion/refsite/sitemap.xml
vendored
Normal file
11
tests/fixtures/recursive-inclusion/refsite/sitemap.xml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2021-01-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url><url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2021-01-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
1
tests/fixtures/recursive-inclusion/xyzzy
vendored
Normal file
1
tests/fixtures/recursive-inclusion/xyzzy
vendored
Normal file
@ -0,0 +1 @@
|
||||
clus
|
Loading…
Reference in New Issue
Block a user