Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offline support #1779

Merged
merged 13 commits into from
Oct 1, 2019
Merged

Add offline support #1779

merged 13 commits into from
Oct 1, 2019

Conversation

rnevius
Copy link
Contributor

@rnevius rnevius commented Sep 25, 2019

Description

Adds layouts, styles, and build processes for generating offline documentation (e.g. PDFs). For now, PDFs should be generated manually via Adobe Acrobat.

Resolves #1647

Motivation and Context

Customers would like to access Sensu docs offline and on e-reader devices.

Review Instructions

  1. Run a local hugo server with offline layouts

    yarn run server --layoutDir=offline
    
  2. Navigate to http://localhost:1313/ and select your product/version of choice. Note the URL of this resource.

  3. Open Acrobat and File → Create → PDF from Web Page

    image image

@rnevius rnevius added the ready for review PR is ready to review label Sep 25, 2019
@rnevius rnevius self-assigned this Sep 25, 2019
@rnevius rnevius added this to the Site development milestone Sep 25, 2019
@rnevius
Copy link
Contributor Author

rnevius commented Sep 25, 2019

@cwjohnston here's an example of a generated PDF: Sensu Go 5.13 - Sensu Docs.pdf

An issue that should be apparent right away is that SVG images aren't rendered by Acrobat. We could replace these with PNGs as needed.

@hillaryfraley
Copy link
Contributor

hillaryfraley commented Sep 25, 2019

Hi @rnevius ! I'm working on trying this out -- I seem to have some trouble at the yarn run server --layoutDir=offline point. Here's what happens in terminal:


Never mind, I needed to switch to your branch! facepalm

@rnevius
Copy link
Contributor Author

rnevius commented Sep 25, 2019

@hillaryfraley have you switched to this branch? The "postcss:develop" grunt task should be processing 2 stylesheets and generating 2 sourcemaps...so it almost seems like some of the source files are missing.

@hillaryfraley
Copy link
Contributor

Yes, that was it, thank you -- sorry I didn't realize it sooner.
Just PDFd 5.0!

@rnevius
Copy link
Contributor Author

rnevius commented Sep 27, 2019

It also appears that Acrobat doesn't render/capture emoji (such as the ✅ which is used in supported platform tables).

@asachs01 asachs01 mentioned this pull request Sep 30, 2019
5 tasks
@hillaryfraley hillaryfraley merged commit 8746711 into master Oct 1, 2019
hillaryfraley added a commit that referenced this pull request Oct 1, 2019
hillaryfraley added a commit that referenced this pull request Oct 1, 2019
echlebek pushed a commit that referenced this pull request Oct 1, 2019
* Add initial offline layouts.

* Add basic Table of Contents to offline templates

* Add instructions for previewing offline docs

* Add "offline" key to front matter

Enables pages to be excluded from offline docs

* Add documentation for offline front matter

* Update offline style build process.

* Update offline styles

* Add offline build script

* Update offline styles

* Fix language-toggle display for offline docs

* Fix tables in offline docs
hillaryfraley pushed a commit that referenced this pull request Oct 2, 2019
* Add initial offline layouts.

* Add basic Table of Contents to offline templates

* Add instructions for previewing offline docs

* Add "offline" key to front matter

Enables pages to be excluded from offline docs

* Add documentation for offline front matter

* Update offline style build process.

* Update offline styles

* Add offline build script

* Update offline styles

* Fix language-toggle display for offline docs

* Fix tables in offline docs
@hillaryfraley hillaryfraley mentioned this pull request Oct 2, 2019
11 tasks
@hillaryfraley hillaryfraley removed the ready for review PR is ready to review label May 11, 2021
@calebhailey calebhailey added the site development Improves docs.sensu.io functionality label Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site development Improves docs.sensu.io functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create layout for exporting docs to PDF manually
3 participants