[gegl] docs: update hello-world.adoc



commit 7400b7f36f47b0f2532b96c8ab99d16560018913
Author: John <jtm home gmail com>
Date:   Tue Feb 16 14:35:31 2021 +0000

    docs: update hello-world.adoc

 docs/hello-world.adoc    | 27 +++++++++++++++++++++++++++
 docs/hello-world.adoc.in | 18 ------------------
 docs/meson.build         |  9 +--------
 3 files changed, 28 insertions(+), 26 deletions(-)
---
diff --git a/docs/hello-world.adoc b/docs/hello-world.adoc
new file mode 100644
index 000000000..9484d6daa
--- /dev/null
+++ b/docs/hello-world.adoc
@@ -0,0 +1,27 @@
+Hello world
+-----------
+The following is a small sample GEGL application that animates a zoom on
+a mandelbrot fractal. compile it with:
+
+ $ gcc hello-world.c `pkg-config --libs --cflags gegl` -o hello-world
+
+This example and others can be found in the
+link:http://git.gnome.org/browse/gegl/tree/examples/[examples
+subdirectory] of the GEGL source tree.
+
+// Use source highlighting if available
+ifeval::["{highlight}" == "true"]
+.hello-world.c
+[source, txt]
+-----
+include::{source_root}/examples/hello-world.c[]
+-----
+endif::[]
+
+// Otherwise use a literal block
+ifeval::["{highlight}" != "true"]
+.hello-world.c
+.....
+include::{source_root}/examples/hello-world.c[]
+.....
+endif::[]
diff --git a/docs/meson.build b/docs/meson.build
index 5fe336128..7015d162b 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -35,15 +35,7 @@ asciidoc_files = files(
   'editor.adoc',
   'journal.adoc',
 )
-asciidoc_files += [
-  configure_file(
-    input : 'hello-world.adoc.in',
-    output: '@BASENAME@',
-    configuration: asciidoc_config,
-  ),
-]
 
-# asciidoc html files
 _tgt = []
 foreach _file: asciidoc_files
   _tgt += custom_target(
@@ -88,6 +80,7 @@ website_asciidoc_files = files(
   'features.adoc',
   'gegl-chain.adoc',
   'glossary.adoc',
+  'hello-world.adoc',
   'operation-api.adoc',
   'source-overview.adoc',
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]