Add template files to handle language in tutorials
authorThibault Saunier <tsaunier@igalia.com>
Fri, 4 Dec 2020 19:10:51 +0000 (16:10 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Mon, 7 Dec 2020 14:12:35 +0000 (11:12 -0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/124>

markdown/templates/ALERT_JS.md [new file with mode: 0644]
markdown/templates/ALERT_PY.md [new file with mode: 0644]
markdown/templates/C+JS_FALLBACK.md [new file with mode: 0644]
markdown/templates/C+PY_FALLBACK.md [new file with mode: 0644]
markdown/templates/C.md [new file with mode: 0644]
markdown/templates/END_LANG.md [new file with mode: 0644]
markdown/templates/JS.md [new file with mode: 0644]
markdown/templates/PY.md [new file with mode: 0644]
meson.build

diff --git a/markdown/templates/ALERT_JS.md b/markdown/templates/ALERT_JS.md
new file mode 100644 (file)
index 0000000..d3d89cb
--- /dev/null
@@ -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 (file)
index 0000000..fd7ac26
--- /dev/null
@@ -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 (file)
index 0000000..dc23ccc
--- /dev/null
@@ -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 (file)
index 0000000..c91330e
--- /dev/null
@@ -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 (file)
index 0000000..36e0cde
--- /dev/null
@@ -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 (file)
index 0000000..cd0e29a
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+</div> <!-- LANGUAGE -->
+
diff --git a/markdown/templates/JS.md b/markdown/templates/JS.md
new file mode 100644 (file)
index 0000000..3850c01
--- /dev/null
@@ -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 (file)
index 0000000..a08f3ac
--- /dev/null
@@ -0,0 +1,4 @@
+
+
+<div class="gi-symbol-python">
+
index 0268ebc..34727bf 100644 (file)
@@ -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,