[tracker/wip/carlosg/gi-docgen: 25/26] docs: Generate examples page with actual examples
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/gi-docgen: 25/26] docs: Generate examples page with actual examples
- Date: Sun, 6 Jun 2021 23:53:25 +0000 (UTC)
commit 0fbc419e57dae904c51084fee8386a1cd6119cd6
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jun 7 01:24:52 2021 +0200
docs: Generate examples page with actual examples
Do some string replacement here to include the examples.
.../{examples.md => examples.md.in} | 0
docs/reference/libtracker-sparql/meson.build | 23 ++++++++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/examples.md b/docs/reference/libtracker-sparql/examples.md.in
similarity index 100%
rename from docs/reference/libtracker-sparql/examples.md
rename to docs/reference/libtracker-sparql/examples.md.in
diff --git a/docs/reference/libtracker-sparql/meson.build b/docs/reference/libtracker-sparql/meson.build
index a492accfd..14321c810 100644
--- a/docs/reference/libtracker-sparql/meson.build
+++ b/docs/reference/libtracker-sparql/meson.build
@@ -1,3 +1,22 @@
+documents_with_examples = [
+ [ 'examples.md.in', 'examples.md' ],
+]
+examples = []
+
+foreach doc : documents_with_examples
+ examples += custom_target(
+ 'examples-generate',
+ input: doc[0],
+ output: doc[1],
+ command: [
+ 'embed-files.py',
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ depend_files: [ doc[0] ],
+ build_by_default: true)
+endforeach
+
base_ontology_docs = custom_target('ontology-docgen',
output: ['dc-ontology.md'],
command: [tracker_docgen,
@@ -12,7 +31,6 @@ base_ontology_docs = custom_target('ontology-docgen',
content = [
'overview.md',
'ontologies.md',
- 'examples.md',
'limits.md',
'performance.md',
'sparql-and-tracker.md',
@@ -22,6 +40,7 @@ content = [
]
generated_content = [
+ 'examples.md',
'xsd-ontology.md',
'dc-ontology.md',
'rdf-ontology.md',
@@ -57,6 +76,6 @@ custom_target(
'--content-dir=@0@'.format(icon_images_base),
'@INPUT1@',
],
- depends: [tracker_sparql_gir[0], base_ontology_docs],
+ depends: [tracker_sparql_gir[0], base_ontology_docs, examples],
depend_files: [ content ],
build_by_default: true)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]