To produce an EPUB or PDF, you must create a page that assembles the individual pieces of content into a final document. You can think of this page as a sort of master header file that lists all the other elements that should be included in the final document. These files should:
-
Have a name that ends with the string "\_INDEX". This tells the system that it’s a special page used to build a final document.
-
Contain a bulleted list of files to include in the order in which they are to appear. You reference each of these by page name, which you can find by clicking the "All Pages" button. Note that you do not have to have an "include::" at the beginning, or a ".asciidoc[]" at the end. These will be added automatically.
Note
|
The "All pages" button is a quick way to get list of all the pages in your project. You can use cut-and-paste to quickly create an _INDEX file, and then put them in the correct order. |
Here, for example, are the contents of gsg_INDEX, which lists all the pages in this guide:
* gsg * gsg_asciidoc_quickstart * gsg_code_samples * gsg_editing_locally * gsg_figures_and_xrefs * gsg_project_structure * gsg_tips_and_tricks
Once you create an "\_INDEX" file like this, you’ll see a button called "Build Project" appear at the top right hand corner of the screen, as shown in The "Build Project" button appears on _INDEX pages..
When you click the button, a new window open that will show you the status of the build as it runs. Assuming all goes well, you’ll receive an indicator that the build succeeded. You can then use the links in the right-sidebar to view the final output from the build.
If there is an error in your markup, you’ll receive a link to a log that will help you "debug" your project. This is described in the next section.