summaryrefslogtreecommitdiffstats
path: root/tests/test_sphinx/sourcedirs/includes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_sphinx/sourcedirs/includes')
-rw-r--r--tests/test_sphinx/sourcedirs/includes/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/includes/example1.jpgbin0 -> 57841 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include1.inc.md12
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include_code.py2
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include_literal.txt6
-rw-r--r--tests/test_sphinx/sourcedirs/includes/index.md31
-rw-r--r--tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpgbin0 -> 57841 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md21
8 files changed, 74 insertions, 0 deletions
diff --git a/tests/test_sphinx/sourcedirs/includes/conf.py b/tests/test_sphinx/sourcedirs/includes/conf.py
new file mode 100644
index 0000000..4cf4e93
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build", "*.inc.md", "**/*.inc.md"]
diff --git a/tests/test_sphinx/sourcedirs/includes/example1.jpg b/tests/test_sphinx/sourcedirs/includes/example1.jpg
new file mode 100644
index 0000000..1c1e83e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/example1.jpg
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/includes/include1.inc.md b/tests/test_sphinx/sourcedirs/includes/include1.inc.md
new file mode 100644
index 0000000..3eea6ac
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include1.inc.md
@@ -0,0 +1,12 @@
+---
+orphan: true
+---
+(inc_header)=
+## A Sub-Heading in Include
+
+Some text with *syntax*
+
+```{include} subfolder/include2.inc.md
+:relative-images:
+:relative-docs: ..
+```
diff --git a/tests/test_sphinx/sourcedirs/includes/include_code.py b/tests/test_sphinx/sourcedirs/includes/include_code.py
new file mode 100644
index 0000000..3158954
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include_code.py
@@ -0,0 +1,2 @@
+def a_func(param):
+ print(param)
diff --git a/tests/test_sphinx/sourcedirs/includes/include_literal.txt b/tests/test_sphinx/sourcedirs/includes/include_literal.txt
new file mode 100644
index 0000000..5bb9418
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include_literal.txt
@@ -0,0 +1,6 @@
+This should be *literal*
+
+Lots
+of
+lines
+so we can select some
diff --git a/tests/test_sphinx/sourcedirs/includes/index.md b/tests/test_sphinx/sourcedirs/includes/index.md
new file mode 100644
index 0000000..dc904e3
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/index.md
@@ -0,0 +1,31 @@
+# Main Title
+
+```{include} include1.inc.md
+```
+
+{ref}`inc_header`
+
+```{include} include_code.py
+:code: python
+```
+
+```{include} include_code.py
+:code: python
+:number-lines: 0
+```
+
+```{include} include_literal.txt
+:literal:
+```
+
+```{include} include_literal.txt
+:literal:
+:name: literal_ref
+:start-line: 2
+:end-before: lines
+:number-lines: 0
+```
+
+### A Sub-sub-Heading
+
+some more text
diff --git a/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg b/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg
new file mode 100644
index 0000000..1c1e83e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md b/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md
new file mode 100644
index 0000000..a6eebcf
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md
@@ -0,0 +1,21 @@
+## A Sub-Heading in Nested Include
+
+Some other text with **syntax**
+
+This relative path will refer to the importing file:
+
+```{figure} example1.jpg
+Caption
+```
+
+This absolute path will refer to the project root (where the `conf.py` is):
+
+```{figure} /subfolder/example2.jpg
+Caption
+```
+
+![alt](example2.jpg)
+
+![alt](https://example.com)
+
+[text](../index.md)