Skip to content

Commit c981575

Browse files
Update website/email newsletter build instructions (#4083)
1 parent 739a0bf commit c981575

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,39 @@ Use the included `new_contribs.sh` script:
137137

138138
## Building
139139

140-
Ensure you have SASS installed. The easiest way to get it is via `gem`, the
141-
Ruby package manager.
140+
To ensure consistency across development setups, we use a [Docker](https://www.docker.com) container-based
141+
workflow for building the website and email newsletter. Similarly, we use a `makefile` to Ensure you have Docker installed on your system if
142+
you intend to build the website or email newsletter.
142143

143-
```
144-
env SASS_BIN=$HOME/.gem/ruby/*/bin/sass pelican content -s pelicanconf.py
145-
```
144+
### Building the website
145+
146+
*Before attempting to build the website, ensure Docker is in a running state on your system.*
147+
148+
* Enter the `publishing/` directory:
149+
```sh
150+
cd publishing
151+
```
152+
* Run the Docker build and website local-host command:
153+
```sh
154+
make build && make generate-website && make host-content
155+
```
156+
* View the website locally at default http://localhost:8000, or specific posts
157+
at http://localhost:8000/blog/{YEAR}/{MONTH}/{DAY}/{ISSUE}/.
158+
159+
Note: If looking to test the website's search functionality locally, you will need to adjust the [`TESTING_LOCALLY`](https://github.com/rust-lang/this-week-in-rust/blob/dc127f17fcabbf0f058eb3d5a3febba434ddca83/pelicanconf.py#L7)
160+
variable to `True`.
161+
162+
### Building the newsletter
146163

147-
### To build the newsletter
164+
*Before attempting to build the email newsletter, ensure Docker is in a running state on your system.*
148165

149-
* Generate the HTML
166+
* Enter the `publishing/` directory:
167+
```sh
168+
cd publishing
150169
```
151-
TWIR_NEWSLETTER_THEME=1 pelican --delete-output-directory content
170+
* Run the Docker build and website local-host command:
171+
```sh
172+
make build && make generate-email && make host-content
152173
```
153-
* Copy the HTML and inline CSS at http://zurb.com/ink/inliner.php - (MailChimp's inliner doesn't remove the CSS from `<head>`).
154-
* Send the newsletter (we currently use MailChimp).
174+
* View the email newsletter formatting of specific posts at
175+
http://localhost:8000/blog/{YEAR}/{MONTH}/{DAY}/{ISSUE}/.

0 commit comments

Comments
 (0)