summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-12-04 16:10:51 -0300
committerThibault Saunier <tsaunier@igalia.com>2020-12-07 11:12:35 -0300
commite085b455636b7ffd134d75b4e0a91a4a19f1edca (patch)
tree3816f7921147d4b06db9fba9609cdfc1c4e14f5a
parentdf3a6542a2facc6813ebd130de7ea7230a24945e (diff)
Add template files to handle language in tutorials
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/124>
-rw-r--r--markdown/templates/ALERT_JS.md8
-rw-r--r--markdown/templates/ALERT_PY.md9
-rw-r--r--markdown/templates/C+JS_FALLBACK.md2
-rw-r--r--markdown/templates/C+PY_FALLBACK.md2
-rw-r--r--markdown/templates/C.md2
-rw-r--r--markdown/templates/END_LANG.md4
-rw-r--r--markdown/templates/JS.md4
-rw-r--r--markdown/templates/PY.md4
-rw-r--r--meson.build7
9 files changed, 41 insertions, 1 deletions
diff --git a/markdown/templates/ALERT_JS.md b/markdown/templates/ALERT_JS.md
new file mode 100644
index 0000000..d3d89cb
--- /dev/null
+++ b/markdown/templates/ALERT_JS.md
@@ -0,0 +1,8 @@
+
+
+{{ JS.md }}
+
+> ![Warning](images/icons/emoticons/warning.svg) **Please port this tutorial to javascript!**
+
+{{ END_LANG.md }}
+
diff --git a/markdown/templates/ALERT_PY.md b/markdown/templates/ALERT_PY.md
new file mode 100644
index 0000000..fd7ac26
--- /dev/null
+++ b/markdown/templates/ALERT_PY.md
@@ -0,0 +1,9 @@
+
+
+{{ PY.md }}
+
+> ![Warning](images/icons/emoticons/warning.svg) **Please port this tutorial to python!**
+
+{{ END_LANG.md }}
+
+
diff --git a/markdown/templates/C+JS_FALLBACK.md b/markdown/templates/C+JS_FALLBACK.md
new file mode 100644
index 0000000..dc23ccc
--- /dev/null
+++ b/markdown/templates/C+JS_FALLBACK.md
@@ -0,0 +1,2 @@
+
+<div class="gi-symbol-c gi-symbol-javascript">
diff --git a/markdown/templates/C+PY_FALLBACK.md b/markdown/templates/C+PY_FALLBACK.md
new file mode 100644
index 0000000..c91330e
--- /dev/null
+++ b/markdown/templates/C+PY_FALLBACK.md
@@ -0,0 +1,2 @@
+
+<div class="gi-symbol-c gi-symbol-python">
diff --git a/markdown/templates/C.md b/markdown/templates/C.md
new file mode 100644
index 0000000..36e0cde
--- /dev/null
+++ b/markdown/templates/C.md
@@ -0,0 +1,2 @@
+
+<div class="gi-symbol-c">
diff --git a/markdown/templates/END_LANG.md b/markdown/templates/END_LANG.md
new file mode 100644
index 0000000..cd0e29a
--- /dev/null
+++ b/markdown/templates/END_LANG.md
@@ -0,0 +1,4 @@
+
+
+</div> <!-- LANGUAGE -->
+
diff --git a/markdown/templates/JS.md b/markdown/templates/JS.md
new file mode 100644
index 0000000..3850c01
--- /dev/null
+++ b/markdown/templates/JS.md
@@ -0,0 +1,4 @@
+
+
+<div class="gi-symbol-javascript">
+
diff --git a/markdown/templates/PY.md b/markdown/templates/PY.md
new file mode 100644
index 0000000..a08f3ac
--- /dev/null
+++ b/markdown/templates/PY.md
@@ -0,0 +1,4 @@
+
+
+<div class="gi-symbol-python">
+
diff --git a/meson.build b/meson.build
index 0268ebc..34727bf 100644
--- a/meson.build
+++ b/meson.build
@@ -106,7 +106,12 @@ gstreamer_doc = hotdoc.generate_doc('GStreamer',
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
syntax_highlighting_activate: true,
html_theme: html_theme,
- include_paths: join_paths(meson.current_source_dir(), 'examples'),
+ include_paths: [
+ meson.current_source_dir() / 'examples',
+ meson.current_source_dir() / 'markdown' / 'tutorials' / 'basic',
+ meson.current_source_dir() / 'markdown' / 'templates',
+ meson.current_source_dir() / 'markdown' / 'tutorials' / 'playback',
+ ],
html_extra_theme: join_paths(meson.current_source_dir(), 'theme/extra'),
dependencies: deps,
subprojects: hotdoc_subprojects,