content updates
This commit is contained in:
@@ -46,11 +46,11 @@ The theme shows two build outputs: one for designers, and one for writers. Here'
|
||||
|
||||
1. Using iTerm, create the directory where you want to install the project. I like using ~[username]/projects, because ~[username] is the default directory that appears when you open iTerm on a Mac.
|
||||
|
||||
```
|
||||
cd projects
|
||||
mkdir acme
|
||||
cd acme
|
||||
```
|
||||
```
|
||||
cd projects
|
||||
mkdir acme
|
||||
cd acme
|
||||
```
|
||||
|
||||
2. Once you're inside the folder for your project (for example, acme), type `git clone https://github.com/tomjohnson1492/documentation-theme-jekyll.git .` (The ` .` means to clone the github repo into the current directory. Make sure the directory is empty before cloning the theme in there.)
|
||||
3. In your new project folder, remove the .git folder, because no doubt you'll be customizing this project's content and committing it to another revision control repository.
|
||||
@@ -62,10 +62,8 @@ cd acme
|
||||
6. Remove the content inside the pages folder, and then add your own pages in this pages folder. (Using subfolders and sub-subfolders inside the pages folder is all right -- you don't have to worry about folder paths in links.)
|
||||
7. Inside _data, open sidebar.yml and topnav.yml and customize the navigation. (Don't mess up the spacing or change any of the YML level names or the site or sidebar won't build.)
|
||||
8. In the root directory, rename build_writer.sh to build_[your audience].sh (same with build_designer.sh for additional outputs). In the files' contents, change the build parameters to point to the configuration file and output directory that you want.
|
||||
|
||||
The `--config` parameter specifies the directory where the build reads the configuration file, and the `-o` parameter specifies the directory where the PDF is built.)
|
||||
|
||||
{{note}} For more information on setting up PDF builds, see {{create_pdf}}. You will need to set up Prince in order for the PDF build to work. {{end}}
|
||||
{{note}} When you're just starting out, don't worry about setting up the PDF builds. This workflow is more complicated and somewhat touchy. See {{create_pdf}} for more details. You will need to set up Prince in order for the PDF build to work. {{end}}
|
||||
|
||||
9. In the root directory, customize the index.md file. This file will be the homepage for all of your projects. Use conditional tags (for example, `if site.audience == "writer" ...`) to change the content for different builds of your site. See {{conditional_logic}} for more information.
|
||||
10. In the _includes folder, open linkrefs.html and add capture tags for all the pages in your site following the sample format shown. This will make it easy to link to each of the topics. (Don't remove the capture tags for the alerts and callouts.)
|
||||
|
||||
@@ -20,7 +20,7 @@ Find the PID (for example, it looks like "22298").
|
||||
|
||||
Then type `kill -9 22298` where "22298" is the PID.
|
||||
|
||||
# "page 0" cross references in the PDF
|
||||
## "page 0" cross references in the PDF
|
||||
|
||||
If you see "page 0" cross-references in the PDF, the URL doesn't exist. Check to make sure you actually included this page in the build. If it's not a page but rather a file, you need to add a class to the file so that your print stylesheet excludes the counter from it. Try adding `class="noCrossRef"` as an attribute to the link. In the css/printstyles.css file, there is a style that should remove the counter from anchor elements with this class.
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ remaining tasks:
|
||||
- handle page 0 links -- which indicate that there is no cross reference. maybe add note in instructions.
|
||||
{% endcomment %}
|
||||
|
||||
{{warning}} The PDF creation process has some bugs and is still being worked out... {{end}}
|
||||
|
||||
This process for creating a PDF relies on Prince to transform the HTML content into PDF. Prince costs about $500 per license.
|
||||
|
||||
1. Download and install [Prince](http://www.princexml.com/).
|
||||
@@ -23,12 +25,16 @@ This process for creating a PDF relies on Prince to transform the HTML content i
|
||||
|
||||
{{note}} Although you're creating a PDF, you must still build a web target before running Prince. Prince will pull from the HTML files and from the file-list for the TOC.{{end}}
|
||||
|
||||
3. In the css folder, open the print-header-fe.css file. Change the filename to your audience. Customize what appears in each of the page margins.
|
||||
3. In the css folder, open the print-header-writer.css and print-header-designer.css files. Change the filenames to your audiences. Customize what appears in each of the page margins.
|
||||
4. In the default_print.html file in the layout folder, customize the conditional logic to match your audience with the stylesheets you created in the previous step.
|
||||
5. In the _data folder, open sidebar.yml and add `print: true` for each page that you want to appear in the print version. (The pages in the topnav aren't pushed to PDF, so if you need some of the pages there, add them to the sidebar and add a `web: false` property to each of them (in addition to a `print: true` property).)
|
||||
6. In the project's root directory, the logic in the prince-file-list.txt will pull all files from the sidebar.yml file to be included in the PDF. You can adjust any of the logic there as needed, but you shouldn't need to do anything to the file.
|
||||
5. In the root directory, rename the pdf_fe.sh file and customize its contents to point to the right folders on your computer (the configuration file and the output destination).
|
||||
6. In the root directory, open the pdf_writer.sh file and customize the directory paths. They should point to where this project builds, so the script can find the processed prince-file-list file and so it knows where to build the output. This .sh file allows you to run the PDF build.
|
||||
7. Browse to the directory containing pdf_writer.sh file and type `. pdf_writer.sh`.
|
||||
5. In the root directory, rename the build_writer_pdf.sh file and customize its contents to point to the right paths on your computer.
|
||||
5. In the root directory, rename the build_writer_prince.sh file and customize the input and output directories. The input should point to where this project builds, so the script can find the processed prince-file-list.txt file and so it knows where to build the output.
|
||||
7. In iTerm, first run `. build_writer_pdf.sh` to get the pdf version of the content ready.
|
||||
8. Now run `. build_writer_prince.sh` to generate the PDF from this version.
|
||||
8. Check for links to non-existent topics in the PDF by looking for "page 0".
|
||||
9. For those broken links, conditionalize the content to whether site.print == true or not.
|
||||
10. Stop the server that has the build_writer_pdf preview.
|
||||
|
||||
{{note}} Ideally, I wanted to create a script that launched the server, then built prince, and then stopped the server, but I haven't figured that out yet. You have to detach the server, and once you detach it, the only way to kill it is by referencing a dynamically generated PID. {{end}}
|
||||
|
||||
Reference in New Issue
Block a user