From e085b455636b7ffd134d75b4e0a91a4a19f1edca Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 4 Dec 2020 16:10:51 -0300 Subject: [PATCH] Add template files to handle language in tutorials Part-of: --- markdown/templates/ALERT_JS.md | 8 ++++++++ markdown/templates/ALERT_PY.md | 9 +++++++++ markdown/templates/C+JS_FALLBACK.md | 2 ++ markdown/templates/C+PY_FALLBACK.md | 2 ++ markdown/templates/C.md | 2 ++ markdown/templates/END_LANG.md | 4 ++++ markdown/templates/JS.md | 4 ++++ markdown/templates/PY.md | 4 ++++ meson.build | 7 ++++++- 9 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 markdown/templates/ALERT_JS.md create mode 100644 markdown/templates/ALERT_PY.md create mode 100644 markdown/templates/C+JS_FALLBACK.md create mode 100644 markdown/templates/C+PY_FALLBACK.md create mode 100644 markdown/templates/C.md create mode 100644 markdown/templates/END_LANG.md create mode 100644 markdown/templates/JS.md create mode 100644 markdown/templates/PY.md diff --git a/markdown/templates/ALERT_JS.md b/markdown/templates/ALERT_JS.md new file mode 100644 index 0000000000..d3d89cb4ae --- /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 0000000000..fd7ac26cd4 --- /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 0000000000..dc23ccc85b --- /dev/null +++ b/markdown/templates/C+JS_FALLBACK.md @@ -0,0 +1,2 @@ + +
diff --git a/markdown/templates/C+PY_FALLBACK.md b/markdown/templates/C+PY_FALLBACK.md new file mode 100644 index 0000000000..c91330e408 --- /dev/null +++ b/markdown/templates/C+PY_FALLBACK.md @@ -0,0 +1,2 @@ + +
diff --git a/markdown/templates/C.md b/markdown/templates/C.md new file mode 100644 index 0000000000..36e0cdeb23 --- /dev/null +++ b/markdown/templates/C.md @@ -0,0 +1,2 @@ + +
diff --git a/markdown/templates/END_LANG.md b/markdown/templates/END_LANG.md new file mode 100644 index 0000000000..cd0e29a562 --- /dev/null +++ b/markdown/templates/END_LANG.md @@ -0,0 +1,4 @@ + + +
+ diff --git a/markdown/templates/JS.md b/markdown/templates/JS.md new file mode 100644 index 0000000000..3850c01ed9 --- /dev/null +++ b/markdown/templates/JS.md @@ -0,0 +1,4 @@ + + +
+ diff --git a/markdown/templates/PY.md b/markdown/templates/PY.md new file mode 100644 index 0000000000..a08f3ac17f --- /dev/null +++ b/markdown/templates/PY.md @@ -0,0 +1,4 @@ + + +
+ diff --git a/meson.build b/meson.build index 0268ebcd7f..34727bf302 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,