Skip to content

Commit

Permalink
Updating to new eBook
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Oct 22, 2020
1 parent 974094a commit b037ed6
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 25 deletions.
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,14 @@ Finally, submit a PR to the tutorial repo with the new changes. We'll review it,

Currently we do a lot of manual work to publish updates and maintain the tutorial. You can help by contributing to improve the process. Feel free to get in touch if you're interested in helping out. Here is roughly what we need help with:

- Generating the Ebook

The PDF version of Serverless Stack is very popular. Unfortunately it is generated manually using a set of AppleScripts stored in the `etc/` directory. It opens up Safari and prints to PDF. It would be much better if we could use a headless Chrome script to generate this. In addition to the PDF we need to figure out how to generate the EPUB format.

- Creating a pipeline

We would like to create a Circle CI setup that automatically generates the PDF and uploads the latest version to S3 (where it is hosted) every time a new release is created to the tutorial. We would also like to run a simple suite of tests to ensure that the changes to the demo app repos are correct.

- Compress screenshots

The images for the screenshots are quite large. It would be ideal if they can be compressed as a part of the build process.

- ~~Generating the Ebook~~

- ~~Creating a pipeline~~

### Translating to Other Languages

We currently have translation efforts for Spanish and Portuguese underway. If you'd like to get involved [refer to this thread](https://github.com/AnomalyInnovations/serverless-stack-com/issues/271).
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,26 @@ You can also turn on live reloading and incremental builds while editing.
$ bundle exec jekyll serve --incremental --livereload
```

#### Generating the PDF
#### Generating the eBook

You can generate the PDF locally on macOS by following these steps.
We use [Pandoc](https://pandoc.org) to create the eBook. You can generate it locally by following these steps.

1. Generate a `Cover.pdf` with latest version and date
1. Create an `ebook` folder in `~/Downloads` (for example).
2. Update the date and version in the `etc/cover.html`
3. Open the cover page locally in Safari by going to `file:///Users/frank/Sites/ServerlessStackCom/etc/cover.html`.
4. In the Safari Menu on the File Menu, hit the **Export to PDF…** button.
5. Place `Cover.pdf` in the `~/Downloads/ebook` folder.
2. Ensure `ebook` folder is an option when hitting the **Export to PDF…** button in Safari.
3. In the terminal, run `osascript pdf.scpt` in the `etc/` directory of this repository.
``` bash
$ cd ~/Sites/ServerlessStackCom/etc/ebook
$ make start
```

This'll start a Docker instance. Inside the Docker run:

``` bash
$ make pdf
$ make epub
```

The above are run automatically through [Github Actions](https://github.com/AnomalyInnovations/serverless-stack-com/actions) in this repo:

We are looking for a better way to generate the PDF (and other eBook) formats. If you've got any ideas [consider contributing][Contributing].
- When a new commit is pushed to master
- And when a new tag is pushed, the generated eBook is uploaded to S3

## Sponsors

Expand Down
8 changes: 7 additions & 1 deletion _chapters/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ You can get these updates emailed to you via our [newsletter]({{ site.newsletter

### Changes

#### [v5.0: {{ site.data.changelog.current.title }}](https://branchv50--serverless-stack.netlify.app/) (Current)
#### [v5.0.1: {{ site.data.changelog.current.title }}](https://branchv501--serverless-stack.netlify.app/) (Current)

{{ site.data.changelog.current.desc }}

- [Tutorial changes]({{ site.github_repo }}/compare/v5.0...v5.0.1)

#### [v5.0: {{ site.data.changelog.v5-0.title }}](https://branchv50--serverless-stack.netlify.app/)

{{ site.data.changelog.v5-0.desc }}

- [Tutorial changes]({{ site.github_repo }}/compare/v4.1...v5.0)
- [API]({{ site.backend_github_repo }}/compare/v4.1...v5.0)

Expand Down
2 changes: 1 addition & 1 deletion _chapters/staying-up-to-date.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To help people stay up to date with the changes, we run the <a href="{{ site.new
- Outlines the recent updates to Serverless Stack
- Never sent out more than once a week
- One click unsubscribe
- And you get the entire guide as a 1000 page PDF
- And you get the entire guide as a 1000 page eBook

You can also <a target="_blank" href="{{ site.twitter_url }}">follow us on Twitter</a>.

Expand Down
4 changes: 4 additions & 0 deletions _data/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
current:
title: "Updating to new eBook format"
desc: "Oct 21, 2020: Generating new eBook using Pandoc."

v5-0:
title: "Using CDK to configure infrastructure resources"
desc: "Oct 7, 2020: Moving from CloudFormation to AWS CDK to configure infrastructure resources. And using Serverless Stack Toolkit (SST) to deploy CDK alongside Serverless Framework."

Expand Down
1 change: 1 addition & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<li class="site-title">
{{ site.title | escape }}
</li>
<li><a class="page-link" href="{{ site.newsletter_signup_form }}">Newsletter</a></li>
<li><a class="page-link" href="{% link _chapters/changelog.md %}">Changelog</a></li>
<li><a class="page-link" href="{% link showcase.md %}">Showcase</a></li>
<li><a class="page-link" href="{% link about.md %}">About us</a></li>
Expand Down
4 changes: 2 additions & 2 deletions _includes/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4 class="site-description-full">
</h4>

<div class="controls">
<a class="button" href="#download-pdf">Download PDF</a>
<a class="button" href="#get-ebook">Get the eBook</a>
<a class="button" href="#table-of-contents">Start learning</a>
</div>
</div>
Expand Down Expand Up @@ -108,7 +108,7 @@ <h6><a href="{% link _chapters/changelog.md %}#changes">{{ site.data.changelog.c
</div>
</div>

<div id="download-pdf" class="extras">
<div id="get-ebook" class="extras">
<div class="divider">
</div>
<div class="container">
Expand Down
2 changes: 1 addition & 1 deletion _includes/newsletter-form.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p class="copy">Download this guide as a 1000 page PDF!<br />And get notified when we publish updates.</p>
<p class="copy">Download this guide as a 1000 page eBook!<br />And get notified when we publish updates.</p>
<div class="email-octopus-form-wrapper">
<p class="email-octopus-success-message"></p>
<p class="email-octopus-error-message"></p>
Expand Down
6 changes: 5 additions & 1 deletion _sass/lander.scss
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@
& img {
width: 90px;
height: auto;
filter: grayscale(100%);
&:hover {
filter: none;
}
}
&.tall img {
width: auto;
Expand Down Expand Up @@ -536,7 +540,7 @@
}

&.the-basics {
max-height: 2203px;
max-height: 2083px;

@include media-query($on-palm) {
max-height: 1.5 * $max-height;
Expand Down

0 comments on commit b037ed6

Please sign in to comment.