diff --git a/content/docs-v1/epub.md b/content/docs-v1/epub.md new file mode 100644 index 00000000..bca078a6 --- /dev/null +++ b/content/docs-v1/epub.md @@ -0,0 +1,55 @@ +--- +title: EPUB Output +weight: 6390 +type: essay +abstract: "Produce an EPUB e-book version of your publication" +--- + +Quire is designed to create a website version, a PDF version, and an EPUB e-book version of your project from the same source files. EPUB is {{< q-def "reflowable" >}} and the most widely used format. It will work on most devices and for most e-book vendors. EPUB is an official specification of the World Wide Web Consortium (W3C), and Quire outputs the latest version: EPUB 3.2. This section details how to output, validate, and customize EPUBs in Quire projects. Once your EPUB is ready, visit the [*Deploy Your Project*](/docs-v1/site-deploy/) section of our documentation to learn how to deploy your project to the web. + +## Create and View the E-Book Files + +When creating an EPUB, first run `quire build` in your command-line shell to generate files with your latest changes. Next run `quire epub`. An `epubjs.epub` file will be created and saved to your project’s main directory. This file will be updated and overwritten each time you run `quire epub`. + +EPUB files can be viewed on the default Books app on macOS, or on a number of free EPUB readers available for both Windows and Mac. + +To include the EPUB file as a download from your online edition: + +1. Rename the `epubjs.epub` file if you would like + +2. Move the EPUB file into your `content/_assets/downloads/` directory (create the `downloads` directory if it does not already exist) + +3. Confirm that the `resource_link` information in your `content/_data/publication.yaml` file to points to the EPUB file you just generated + + ```yaml + - type: other-format + name: EPUB + media_type: application/epub+zip + link_relation: alternate + url: /_assets/downloads/epubjs.epub + ``` + +4. Run `quire build` again to generate new `_site` files with the EPUB included inside + +## EPUBCheck Validation + +If you will be distributing your EPUB file via e-book vendors/distributors, it will have to pass validation with [EPUBCheck](https://github.com/w3c/epubcheck). EPUBCheck verifies that the file conforms to EPUB standards which ensures that it will work properly across devices. A valid EPUB will also ensure a valid MOBI file. + +Quire’s default output will pass EPUBCheck, but the EPUB standard is very strict and a number of things can lead to an invalid file. By far the most common errors are broken internal links in markdown files to other files or to heading or image anchors within the file. + +While there is an online validator for smaller files (10MB or less) we recommend downloading EPUBCheck and using it directly. + +1. Download and install Java from https://www.java.com/. +2. Download the ZIP file of the latest EPUBCheck release from https://github.com/w3c/epubcheck/releases. +3. Unzip the downloaded folder. Inside it is a epubcheck.jar file that you’ll reference in the next step. +4. In Terminal or PowerShell Admin type: `java -jar path-to-epubcheck.jar path-to-output.epub` + +EPUBCheck will output a list of any errors or warnings that exist in your file. Only the errors need to be addressed for the file to be considered valid by most e-book vendors. Warnings are optional. Errors will be referenced by filename and line number. The filenames will be internal EPUB naming and not correspond to anything in your markdown project files. See the tip below for looking inside the EPUB file to track down the source of these listed errors. + +{{< q-class "box tip" >}} +- Look inside an EPUB file by opening it in a text editor like Atom, or by manually changing the file suffix to ZIP and uncompressing the file. Just note that you can’t/shouldn’t make change to an EPUB file this way. Rather, make changes in the source markdown and YAML files of your project and re-output the EPUB file. +{{< /q-class >}} + +## EPUB Styles + +EPUBs in Quire have their own style sheet separate from any styles applied to the online version of your project. EPUB styles can be modified and added to in the `content/_assets/styles/epub.scss` file. \ No newline at end of file diff --git a/content/docs-v1/multiformat-output.md b/content/docs-v1/pdf.md similarity index 57% rename from content/docs-v1/multiformat-output.md rename to content/docs-v1/pdf.md index 93cd9a70..c9b02b66 100644 --- a/content/docs-v1/multiformat-output.md +++ b/content/docs-v1/pdf.md @@ -1,110 +1,182 @@ --- -title: Output Your Project +title: PDF Output weight: 6380 type: essay -abstract: "Produce online, PDF, and E-Book versions of your publication" +abstract: "Produce a PDF version of your publication ready for download or printing" aliases: - /documentation/multiformat-output/ + - /docs-v1/multiformat-output/ --- -Quire is designed to create a website version, a PDF version and two e-book versions of your project from the same source files. Each can be customized in various ways as described below. Once your outputs are ready, visit the [*Deploy Your Project*](/docs-v1/site-deploy/) section of our documentation to learn how to deploy your project to the web. +Quire is designed to create a website version, a PDF version, and an EPUB e-book version of your project from the same source files. Quire generates a PDF version of a project directly from the HTML of the online edition. Similar to printing a webpage from a browser, but with a number of added features. This section details how to output, share, configure, and customize PDFs in Quire projects. Once your outputs are ready, visit the [*Deploy Your Project*](/docs-v1/site-deploy/) section of our documentation to learn how to deploy your project to the web. + +{{< q-class "box warning" >}} + +- Quire’s PDF functionality was updated and expanded with Quire CLI version `1.0.0-rc.15`. For earlier versions, the PDF file is generated into the project’s root directory, and there is no functionality to generate and share individual page PDFs, or to configure the PDF filename and output location as documented below. -{{< q-class "box tip" >}} -- Read more about hiding/showing particular pages in particular outputs in the [*Page Types & Structure*](/docs-v1/site-deploy/) section of this guide. {{< /q-class >}} -## Site Output +## Generate PDF Files + +Creating a PDF requires two steps: + +1. Run `quire build` in your command-line shell to generate files with your latest changes +2. Run `quire pdf` to generate the PDF + +The resulting PDF file will be added to the project's `_site/_assets/downloads/` directory. Every time you re-run `quire build`, the. PDF file is automatically deleted and so would need to be regenerated with `quire pdf`. + +When running the `quire pdf` command, the PDF output is generated by [Paged.js](https://pagedjs.org/), an open source HTML-to-PDF generator. + +Alternatively, you can install and use [PrinceXML](https://www.princexml.com/) to generate your PDF. PrinceXML is free to download for non-commercial use, though it does add a logo watermark to the first page of the PDF output. A desktop license can be purchased that will remove the watermark and also allow for commercial use. With PrinceXML installed, run `quire pdf --lib prince` to generate your PDF. (`--lib` is short for 'library'. The command is instructing Quire to use the PrinceXML software library for PDF output, rather than the default Paged.js library.) + +### Generate Individual Page PDFs + +Along with a full PDF of the project, you can also generate individual PDFs for articles, essays, catalogue entries or any other page in your online publication. This can be a useful additional feature for journals, proceedings volumes, or reference works where readers may want to download and save just one or two particular items rather than the full publication. + +Global output settings can be found in the project’s `config.yaml` file. Setting these to true or false determines which PDFs will be output when running `quire pdf`. By default, projects are set to output the publication PDF but not the page PDF. + +```yaml +pdf: + pagePDF: + output: false + publicationPDF: + output: true +``` + +By setting `pdf.pagePDF.output` to `true`, individual PDFs of each Markdown page in your project will be created and output to the `_site/_assets/downloads/` directory alongside the full PDF of the project. + +The individual PDFs are considered extracts of the full PDF and will have matching page numbering. For example, if a chapter starts on page 52 in the full PDF, it will also be numbered starting as 52 in its individual PDF. + +### Control Which Individual Pages Output as PDF -Create the HTML files for your project by running `quire build` in your command-line shell. The files will be built into your project’s `_site` folder along with all the necessary static assets like image files, stylesheets and script files. The `_site` file will be updated and overwritten each time you run `quire build`. +Settings in the `config.yaml` file control the PDF output globally, for all Markdown pages in the project. However, you can override the global settings on a page-by-page basis using the `page_pdf_output` attribute in the YAML of individual Markdown pages. -Note that `quire build` creates the files for the online edition of your Quire project only. Read about creating EPUB and PDF editions in the sections below. +For example, a page in your project with the following YAML will be output as an individual page PDF even if `pagePDF.output` in `config.yaml` is set to `false`: + +```yaml +title: My Essay +layout: essay +order: 100 +page_pdf_output: true +``` + +This is especially useful in larger projects if you only want to output a limited number of pages as individual page PDFs. Likewise, the reverse is true. If you have a large project and want to output all of the pages as PDFs **except** for only a few, set `pagePDF.output` in `config.yaml` to `true`, and then use `page_pdf_output: false` to stop the PDF output on those individual pages: + +```yaml +title: Copyright +layout: page +order: 5 +page_pdf_output: false +``` {{< q-class "box tip" >}} -- If you are a Windows user, please visit the [*Troubleshooting*](/docs-v1/troubleshooting/#quire-commands) section of our documentation for a workaround to a known `quire build` related issue. + +- A page that is set to be excluded from PDF output with `outputs: [epub, html]` will not be output as an individual page PDF even if `page_pdf_output` is set to `true` on that same page. The `outputs` attribute affects **all** PDF outputs and cannot be overridden. Read more about hiding and showing pages using `outputs` in the [”Page Types & Structure”](/docs-v1/pages/#hideshow-pages) section of this guide. + {{< /q-class >}} -## E-Book Output +## Add Links to PDF Downloads + +### Link to the Full PDF -Quire outputs {{< q-def "reflowable" >}} e-books in the EPUB file format. EPUB is the most widely used format and will work on most devices and for most e-book vendors. EPUB is an official specification of the World Wide Web Consortium (W3C), and Quire outputs the latest version: EPUB 3.2. +#### Lin in the Sidebar -### Create and View the E-Book Files +By default, most Quire projects display links to other formats, including the full PDF, in the sidebar navigation menu. -When creating an EPUB, first run `quire build` in your command-line shell to generate files with your latest changes. Next run `quire epub`. An `epubjs.epub` file will be created and saved to your project’s main directory. This file will be updated and overwritten each time you run `quire epub`. +{{< q-figure id="pdf-download-link--sidebar" >}} -EPUB files can be viewed on the default Books app on macOS, or on a number of free EPUB readers available for both Windows and Mac. +This is managed through the `content/_data/publication.yaml` file, where it can be found listed as a `resource_link`. -To include the EPUB file as a download from your online edition: +```yaml +resource_link: + - type: other-format + name: PDF + media_type: application/pdf + link_relation: alternate + url: /_assets/downloads/publication.pdf +``` + +The `name` value can be changed to update the link text. The `url` value is a relative path to where the file can be found within the project’s directories, which by default will be the `/_assets/downloads/` directory, unless you have [configured it differently](#setting-where-the-pdf-file-is-output). -1. Rename the `epubjs.epub` file if you would like +#### Link within Markdown Pages -2. Move the EPUB file into your `content/_assets/downloads/` directory (create the `downloads` directory if it does not already exist) +Links to the PDF download can also be added anywhere within a project’s Markdown files, using standard linking syntax and the relative file path. + +```md +We hope you enjoy this online edition of our publication, featuring embedded video, zooming images and more. For your convenience, a [PDF download](_assets/downloads/publication.pdf) of the complete book is also available. +``` -3. Confirm that the `resource_link` information in your `content/_data/publication.yaml` file to points to the EPUB file you just generated +### Link to individual PDFs - ```yaml - - type: other-format - name: EPUB - media_type: application/epub+zip - link_relation: alternate - url: /_assets/downloads/epubjs.epub - ``` +When `publicationPDF.output` is set to `true`, links will automatically be added to each corresponding page in the online edition for readers to download the PDFs. These download `accessLinks` will appear in the header or footer of the pages, or both. -4. Run `quire build` again to generate new `_site` files with the EPUB included inside +{{< q-figure id="pdf-download-link--page" >}} -### EPUBCheck Validation +The `accessLinks` are configured globally in the `content/_data/config.yaml` file. By default, `header` and `footer` are set to `true` and will display the links in the given position on the page. The links always include a download icon. The `label` value for each allows the text label that is displayed with the link to be customized. Setting `header` or `footer` to `false` will remove the links from that position. -If you will be distributing your EPUB file via e-book vendors/distributors, it will have to pass validation with [EPUBCheck](https://github.com/w3c/epubcheck). EPUBCheck verifies that the file conforms to EPUB standards which ensures that it will work properly across devices. A valid EPUB will also ensure a valid MOBI file. +```yaml +pdf: + pagePDF: + accessLinks: + - header: true + label: 'PDF' + - footer: true + label: 'Download this page' +``` -Quire’s default output will pass EPUBCheck, but the EPUB standard is very strict and a number of things can lead to an invalid file. By far the most common errors are broken internal links in markdown files to other files or to heading or image anchors within the file. +Links to the PDFs can also be added anywhere within the Markdown files, using standard linking syntax with the relative file path and the name of the file. -While there is an online validator for smaller files (10MB or less) we recommend downloading EPUBCheck and using it directly. +```md +[Download a PDF](_assets/downloads/publication-introduction.pdf) of this Introduction +``` -1. Download and install Java from https://www.java.com/. -2. Download the ZIP file of the latest EPUBCheck release from https://github.com/w3c/epubcheck/releases. -3. Unzip the downloaded folder. Inside it is a epubcheck.jar file that you’ll reference in the next step. -4. In Terminal or PowerShell Admin type: `java -jar path-to-epubcheck.jar path-to-output.epub` +Individual page PDFs are named based on the PDF filename, and the file path and name of the Markdown page. For example, if the base PDF file name is `publication` and the file is `introduction.md`, the individual page PDF would be `publication-introduction.pdf`. If that Markdown file was in a section directory named `section-one`, the PDF filename would include that as well and the file would be `publication-section-one-introduction.pdf`. -EPUBCheck will output a list of any errors or warnings that exist in your file. Only the errors need to be addressed for the file to be considered valid by most e-book vendors. Warnings are optional. Errors will be referenced by filename and line number. The filenames will be internal EPUB naming and not correspond to anything in your markdown project files. See the tip below for looking inside the EPUB file to track down the source of these listed errors. +## Include Cover Pages -{{< q-class "box tip" >}} -- Look inside an EPUB file by opening it in a text editor like Atom, or by manually changing the file suffix to ZIP and uncompressing the file. Just note that you can’t/shouldn’t make change to an EPUB file this way. Rather, make changes in the source markdown and YAML files of your project and re-output the EPUB file. -{{< /q-class >}} +Similar to what is found when downloading an article from a service like JSTOR or ProjectMuse, cover pages are added to Quire’s individual page PDFs. Each contains basic bibliographic, citation, copyright, and license information for that article, chapter, or entry. -### EPUB Styles +Setting `coverPage` to `false` in the project’s `content/_data/config.yaml` file will keep the pages from being added. -EPUBs in Quire have their own style sheet separate from any styles applied to the online version of your project. EPUB styles can be modified and added to in the `content/_assets/styles/epub.scss` file. +```yaml +pdf: + pagePDF: + coverPage: true +``` -## PDF/Print Output +{{< q-figure id="pdf-cover-page" >}} -When creating a PDF, first run `quire build` in your command-line shell to generate files with your latest changes. Next run `quire pdf`. A `pagedjs.pdf` file will be created and saved to your project’s main directory. This file will be updated and overwritten each time you run `quire pdf`. +## Configure the PDF Output -Quire’s PDF output is generated by [Paged.js](https://pagedjs.org/), an open source HTML-to-PDF generator. +### Set Where the PDF File is Output -Alternatively, you can use [PrinceXML](https://www.princexml.com/) to generate your PDF. PrinceXML is free to download for non-commercial use, though it does add a logo watermark to the first page of the PDF ouput. A desktop license can be purchased that will remove the watermark and also allow for commercial use. With PrinceXML installed, run `quire pdf --lib prince` to generate your PDF. +By default, PDFs are output the the project’s `_site/assets/downloads/` directory: -To include the PDF file as a download from your online edition: +```yaml +pdf: + outputDir: '/_assets/downloads' +``` -1. Rename the `pagedjs.pdf` (or `prince.pdf`) file if you would like +This default file location can be changed with the `pdf.outputDir` value in the `content/_data/config.yaml` file. It will always be within the `_site` directory. For example, `outputDir: '/_assets/other-formats'` would output the PDF files to the `_site/_assets/other-formats/` directory. -2. Move the PDF file into your `content/_assets/downloads/` directory (create the `downloads` directory if it does not already exist) +### Set the PDF Filename -3. Confirm that the `resource_link` information in your `content/_data/publication.yaml` file to points to the PDF file you just generated +The default filename for the PDF will be `publication.pdf`. A custom filename can be specified with the `pdf.filename` value in the `content/_data/config.yaml` file. In this example, the file would be named `my-project.pdf`. - ```yaml - - type: other-format - name: PDF - media_type: application/pdf - link_relation: alternate - url: /_assets/downloads/pagedjs.pdf - ``` +```yaml +pdf: + filename: 'my-project' +``` -4. Run `quire build` again to generate new `_site` files with the PDF included inside +Filenames should not contain spaces or special characters. -### Output the PDF for Print or for Web +{{< q-class "box warning" >}} -By default, the PDF is output at full-resolution and with full bleed and crop marks for professional printing. +- If the PDF `filename` or `outputDir` values have been customized in the `config.yaml` file, be sure to also update the `resource_link` information to maintain the link’s functionality. -#### Image Resolution +{{< /q-class >}} + +### Image Resolution Figure images are included in the PDF at the same size they were added to the `content/_assets/images/` directory, except when the images have been designated as zooming with `zoom: true` in the `figures.yaml` file. For zooming images, Quire processes and uses a special image that is 2025px wide for the PDF and EPUB output. These are large enough for a full-page image in a printed book. This value can be changed in `_plugins/figures/iiif/config.js`. To make images smaller for web-only PDF output, you would look for the following bit of code in the `config.js` file and change the `width` to 900 or less. @@ -121,6 +193,21 @@ Figure images are included in the PDF at the same size they were added to the `c }, ``` +### Crop Marks and Bleeds + +The PDF is output with full bleed and crop marks. This default setting can be altered in the `content/_assets/styles/variables.scss` file. Adding the following lines to the "Print/PDF stylesheet" section removes the crop marks that are automatically applied to the PDF. + +```scss +$print-crop-marks: false; // true | false +``` +To eliminate the bleed, set `print-bleed` to 0 in the same section of the `variables.scss` file: + +```scss +$print-bleed: 0; +``` +` +## Customize PDF Layout and Design + ### Use Pre-Defined Variables to Modify and Style the PDF Quire creates the PDF from the website version of your Quire site using CSS rules. You can modify Quire’s PDF styles using CSS just like you would modify Quire’s online styles. You can read more about styles in general in the [*Style Customization*](/docs-v1/styles-customization/) section of this guide. @@ -149,19 +236,6 @@ $print-entry-caption-color: $white; $print-entry-image-display: all; // first | all ``` -#### Crop Marks and Bleeds - -As mentioned above, by default, the PDF is output with full bleed and crop marks. This default setting can be altered in the `content/_assets/styles/variables.scss` file. Adding the following lines to the "Print/PDF stylesheet" section removes the crop marks that are automatically applied to the PDF. - -```scss -$print-crop-marks: false; // true | false -``` -To eliminate the bleed, set `print-bleed` to 0 in the same section of the `variables.scss` file: - -```scss -$print-bleed: 0; -``` - ### Add Custom Styles to Refine the Layout When a pre-defined variable is not available, you can instead add custom CSS to your `content/_assets/styles/custom.css` file to achieve the desired result. You can target changes to *only* the print output by wrapping your CSS rules in a {{< q-def "media query">}}. @@ -299,15 +373,15 @@ Also specific for PrinceXML output, figure images can be styled to span both col - Anytime you are making tweaks to the `custom.css` and want to review your work, it is advised to delete the `public` folder before rerunning `quire build` and `quire pdf`. {{< /q-class >}} -### Tips for PDF Design and Development +## Develop PDFs Like a Pro For developers and designers interested in making more extensive changes to the PDF output like the layout refinements documented above, you can make the process easier by using a PDF reader that will auto-reload, displaying a version of the PDF output in your browser, and testing changes in HTML first. -#### Use an Auto-Reloading PDF Reader +### Use an Auto-Reloading PDF Reader Adobe Acrobat (a popular PDF reader) won’t reload the PDF you’re looking at if the file has been changed. We recommend instead using a PDF reader, like [Skim](https://skim-app.sourceforge.io/) for macOS, that will reload the PDF every time it’s changed. For Quire development, this means you can open the PDF to a page you want to make a style change to, make the change in your project, run `quire build` and `quire pdf` and see that change happen as soon as the PDF process is finished running. It takes away the wasted time of closing PDFs, opening new versions and finding your place in them time and time again. -#### Display the PDF Version in a Browser +### Display the PDF Version in a Browser You can use your browser to display a decent, though not exact, preview of what the print output will be. It won’t have the correct page sizes or margins and page numbering, but you'll see the overall text sizes and styles, figures, spacing between these elements, and other parts generally as they'll look in the PDF. This means that you can make changes to your CSS and see a live preview in the browser without having to output the PDF every time. @@ -323,7 +397,7 @@ You can use your browser to display a decent, though not exact, preview of what You can also use the web inspector to help track down different HTML elements and CSS selectors that are effecting the final PDF output. This can make it easier to make changes that will have the desired effect. -#### Test Changes in HTML First +### Test Changes in HTML First While the normal process for PDF development requires running `quire build` and then `quire pdf` every time you make a change to your content and style files, it can sometimes be advantageous to skip the `build` process and test your change in the HTML that generates the PDF first. @@ -350,4 +424,12 @@ Temporarily skipping the build process in this way can save a lot of time, thoug {{< q-class "box warning" >}} - Remember that any time you run `quire build` any changes you made to the `_site/pdf.html` and `_site/pdf.css` will be erased. -{{< /q-class >}} \ No newline at end of file +{{< /q-class >}} + +## Ensure PDF Accessibility + +TK + +## Produce a Print Edition from the PDF + +TK \ No newline at end of file diff --git a/content/docs-v1/site-deploy.md b/content/docs-v1/site-deploy.md index 7793a3ca..4f786396 100644 --- a/content/docs-v1/site-deploy.md +++ b/content/docs-v1/site-deploy.md @@ -7,7 +7,9 @@ aliases: - /documentation/site-deploy/ --- -A Quire site is designed to be hosted on virtually any web server, either one your institution already runs, or a new server from the hosting service of your choice. You do not need any special back-end setup. If you plan to include PDF and e-book files as part of you published project, it's important that you start by following the directions in the [*Output Your Project*](/docs-v1/multiformat-output/) section of the documentation before proceeding. +A Quire site is designed to be hosted on virtually any web server, either one your institution already runs, or a new server from the hosting service of your choice. You do not need any special back-end setup. If you plan to include PDF and EPUB e-book files as part of you published project, it's important that you start by following the directions in the [“PDF Output”](/docs-v1/pdf/), [“EPUB Output”](/docs-v1/epub/) sections of this guide before proceeding. + +## Test Deploy Before deploying your project, you can run a test to make sure all the `_site` files are building correctly and that your styles are properly loading: diff --git a/content/docs-v1/tutorial.md b/content/docs-v1/tutorial.md index b842cbf1..c8b1a3ec 100644 --- a/content/docs-v1/tutorial.md +++ b/content/docs-v1/tutorial.md @@ -274,7 +274,7 @@ figures/lange-house.jpg Once you’ve played around with adding content and customizing your project, it’s time to output it. One of the most significant differences between Quire and other digital publishing tools is the ability to produce your project in multiple formats, including website, e-book, and print. You can create these different versions of your project by running the command `quire build` which will create the site files used to build the PDF and EPUB. Those formats are then generated with the commands `quire pdf` or `quire epub`. -*Read more about outputting your publication files and deploying your project in the [“Output Your Project”](/docs-v1/multiformat-output/)and ["Deploy Your Project"](/docs-v1/site-deploy/) sections of this guide.* +*Read more about outputting your publication files and deploying your project in the [“PDF Output”](/docs-v1/pdf/), [“EPUB Output”](/docs-v1/epub/), and ["Deploy Your Project"](/docs-v1/site-deploy/) sections of this guide.* ### Try it For Yourself diff --git a/data/figures.yml b/data/figures.yml index 28a2a0fc..48a272f0 100644 --- a/data/figures.yml +++ b/data/figures.yml @@ -400,6 +400,21 @@ figure_list: src: /screenshots/pdf-layout-refinement--width.png caption: "A custom CSS style can be defined and applied to change the width of a figure to help it fit within the available white space rather than having it bump to the next column or page." + - id: "pdf-cover-page" + src: /screenshots/pdf-cover-page.jpg + caption: "The output of PDFs of individual chapter or articles can be configured to include a cover page with basic bibliographic and citation information." + alt: "An illustration showing a loose stack of five printed pages, the top sheet is a different design, with a solid color background and simple lines of text in the top half of the page." + + - id: "pdf-download-link--page" + src: /screenshots/pdf-download-link--page.png + caption: "On pages with individual PDFs available, download links can be added to the page header and to the footer at the very bottom of the page. Each includes a standard download icon and configurable text." + alt: "Screenshot of a web page formatted as an article or chapter of a book. In the page header at the top and in the footer at the bottom, red links stand out with download icons and text labels that say PDF and Download the PDF respectively." + + - id: "pdf-download-link--sidebar" + src: /screenshots/pdf-download-link--sidebar.png + caption: "A link to the full project PDF is added to the “Other Formats” section in the sidebar menu. “Other Formats” links are controlled in the `resource_link` list in the `content/_data/publication.yaml` file." + alt: "A screenshot of a web page focused on a detail of a sidebar menu that has a heading Other Formats and two links below it. One says PDF, and the other says EPUB." + - id: "iiif-manifest" src: /screenshots/iiif-manifest.jpg caption: "Scrolling down Getty's collection page for an object that is available as a IIIF image, you will eventually find the manifest URL." diff --git a/data/glossary.yml b/data/glossary.yml index c7ffbe41..931a91ed 100644 --- a/data/glossary.yml +++ b/data/glossary.yml @@ -65,6 +65,8 @@ entries: definition: "ISO 639 is the International Standard for language codes. More information about the standard can be found at the ISO website: [https://www.iso.org/iso-639-language-codes.html](https://www.iso.org/iso-639-language-codes.html)" - term: ISSN definition: "The International Standard Serial Number, or ISSN, identifies newspapers, journals, magazines and periodicals of all kinds and on all media–print and electronic. For more information visit: [https://www.issn.org/](https://www.issn.org/)" + - term: "Liquid" + definition: "Liquid, or Liquid Templating, is a popular templating language that can used within Quire v1 Markdown files. It allows you to retrieve and manipulate data from different areas of a Quire project (YAML files and the YAML blocks at the top of Markdown pages). Basic documentation can be found at [https://shopify.github.io/liquid/](https://shopify.github.io/liquid/)." - term: "Markdown" definition: "Markdown is a text formatting standard that defines the use of very simple text character combinations in order to indicate structure and formatting that can easily be transferred to more complicated HTML (web markup). For example, something surrounded in asterisks in Markdown turns into italics in the final publication: `*emphasis*` = *emphasis*." - term: "Markdown file" diff --git a/static/css/custom.css b/static/css/custom.css index 98eb6b3d..07156a61 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -912,6 +912,11 @@ p:not(.more-link-view-link) .quire-citation__button:hover { content: ""; } +/* Wrap text formatted in Markdown */ +code.language-md { + text-wrap: auto; +} + /* CONTENTS GRID ============================================================================= */ /* Make full width */ @@ -1024,6 +1029,13 @@ p:not(.more-link-view-link) .quire-citation__button:hover { margin-top: 0 !important; } +/* For techniques that require more developer-level skill */ +.advanced { + border: 1px solid var(--yellow-40); + border-radius: 4px; + padding: 1.5rem; +} + /* FIXED MENU ============================================================================= */ diff --git a/static/img/screenshots/pdf-cover-page.jpg b/static/img/screenshots/pdf-cover-page.jpg new file mode 100644 index 00000000..5127815d Binary files /dev/null and b/static/img/screenshots/pdf-cover-page.jpg differ diff --git a/static/img/screenshots/pdf-download-link--page.png b/static/img/screenshots/pdf-download-link--page.png new file mode 100644 index 00000000..f08a0f8e Binary files /dev/null and b/static/img/screenshots/pdf-download-link--page.png differ diff --git a/static/img/screenshots/pdf-download-link--sidebar.png b/static/img/screenshots/pdf-download-link--sidebar.png new file mode 100644 index 00000000..4c79ebac Binary files /dev/null and b/static/img/screenshots/pdf-download-link--sidebar.png differ