[devhelp] help: have a separate topic page for the book-format



commit b5619059434d3e99b24ee3a6fafd16d1ef17a9a4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Dec 19 14:27:19 2019 +0100

    help: have a separate topic page for the book-format

 help/C/book-format.page                  | 47 ++++++++++++++++++++++++++++++++
 help/C/installing-api-documentation.page | 30 ++------------------
 help/meson.build                         |  1 +
 3 files changed, 50 insertions(+), 28 deletions(-)
---
diff --git a/help/C/book-format.page b/help/C/book-format.page
new file mode 100644
index 00000000..002dd86a
--- /dev/null
+++ b/help/C/book-format.page
@@ -0,0 +1,47 @@
+<page xmlns="http://projectmallard.org/1.0/";
+      xmlns:its="http://www.w3.org/2005/11/its";
+      type="topic"
+      id="book-format">
+
+<info>
+  <link type="guide" xref="index" />
+</info>
+
+<title>Book format</title>
+
+<synopsis>
+  <p>
+    A “book” in <app>Devhelp</app> is the API documentation for one module, or
+    package. A book needs to follow a certain format in order for
+    <app>Devhelp</app> to recognize it.
+  </p>
+</synopsis>
+
+<p>
+  The content of a book is placed in one directory. That directory is
+  comprised of:
+</p>
+<list>
+  <item><p>
+    HTML pages, plus possibly CSS files, images, etc;
+  </p></item>
+  <item><p>
+    A file with the <file>.devhelp2</file> file extension. It is the index
+    file, it contains the book structure plus a list of symbols (functions,
+    types, macros, signals, properties, …) that contains links to the HTML
+    files to reach those pages or symbols. In <app>Devhelp</app> the book
+    structure is shown in the side panel. And the
+    <link xref="search">search in the side panel</link> shows results found
+    in the index files.
+  </p></item>
+</list>
+<p>
+  Restriction: the name of the directory the <file>*.devhelp2</file> file is
+  in and the name of the <file>*.devhelp2</file> file (minus the extension)
+  must match. In other words, if the book directory is called
+  <code>$book_name</code>, then the absolute path to the index file should
+  end with <code>$book_name/$book_name.devhelp2</code>. That way, when
+  <app>Devhelp</app> knows the directory name, it directly knows the location
+  to the index file.
+</p>
+</page>
diff --git a/help/C/installing-api-documentation.page b/help/C/installing-api-documentation.page
index 2f3acddd..f746a2fd 100644
--- a/help/C/installing-api-documentation.page
+++ b/help/C/installing-api-documentation.page
@@ -18,34 +18,8 @@
 <section id="book-format">
   <title>Book format</title>
   <p>
-    An API documentation – or book – needs to follow a certain format in order
-    for <app>Devhelp</app> to read it and to add it to its book shelf.
-  </p>
-  <p>
-    The content of a book is placed in one directory. It is comprised of:
-  </p>
-  <list>
-    <item><p>
-      HTML pages, plus possibly CSS files, images, etc;
-    </p></item>
-    <item><p>
-      A file with the <file>.devhelp2</file> file extension. It is the index
-      file, it contains the book structure plus a list of symbols (functions,
-      types, macros, signals, properties, …) that contains links to the HTML
-      files to reach those pages or symbols. In <app>Devhelp</app> the book
-      structure is shown in the side panel. And the
-      <link xref="search">search in the side panel</link> shows results found
-      in the index files.
-    </p></item>
-  </list>
-  <p>
-    Restriction: the name of the directory the <file>*.devhelp2</file> file is
-    in and the name of the <file>*.devhelp2</file> file (minus the extension)
-    must match. In other words, if the book directory is called
-    <code>$book_name</code>, then the absolute path to the index file should
-    end with <code>$book_name/$book_name.devhelp2</code>. That way, when
-    <app>Devhelp</app> knows the directory name, it directly knows the location
-    to the index file.
+    See <link xref="book-format" /> for information on the API documentation
+    format that <app>Devhelp</app> recognizes.
   </p>
 </section>
 
diff --git a/help/meson.build b/help/meson.build
index da53c2cd..6033d184 100644
--- a/help/meson.build
+++ b/help/meson.build
@@ -1,4 +1,5 @@
 pages = [
+  'book-format.page',
   'index.page',
   'installing-api-documentation.page',
   'search.page'


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