<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: 2019 Sébastien Wilmet <swilmet@gnome.org>
SPDX-License-Identifier: CC-BY-SA-4.0
-->
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="book-format" xml:lang="zh-CN">

<info>
  <link type="guide" xref="index"/>

    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>王滋涵 Zephyr Waitzman</mal:name>
      <mal:email>i@wi24rd.ml</mal:email>
      <mal:years>2019</mal:years>
    </mal:credit>
  </info>

<title>Book format</title>

<synopsis>
  <p>
    A “book” in <app>Devhelp</app> is the API documentation for one module, or
    package (usually a library). This page describes the format that a book
    needs to follow in order for <app>Devhelp</app> to recognize it.
  </p>
</synopsis>

<p>
  The content of a book is placed in one directory (that directory contains
  only one book, it cannot contain several books). The directory is comprised
  of:
</p>
<list>
  <item><p>
    HTML pages, plus possibly CSS files, images, etc;
  </p></item>
  <item><p>
    An index file with the <file>*.devhelp2</file> file extension, see
    <link xref="index-file-format"/> for more information.
  </p></item>
</list>
<note>
  <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>
</note>
</page>
