Skip to content

Commit

Permalink
Document how to use pandoc to generate pdf and html versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Sep 11, 2024
1 parent 8f8ea08 commit 848500d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 42 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,20 @@ Edit the files within `ssp-markdown` to populate data for the rendered SSP that

### Render SSP

Output the SSP as a markdown file and html file, both within `ssp-render`
Output the SSP as a markdown file within `./ssp-render`

`render-ssp`

You can optionally use pandoc to transform the markdown file into a variety of formats. For example:

#### PDF

`docker run --rm --volume "/dir/with/rendered_ssp.md:/data" pandoc/latex rendered_ssp.md -o your-pdf-file-name.pdf`

#### HTML

`docker run --rm --volume "/dir/with/rendered_ssp.md:/data" pandoc/latex rendered_ssp.md -s -o your-html-file-name.html --metadata title="SSP Title"`

### Import profile into working space:

If you are using a `PROFILE_NAME` that does not ship with this docker container then you must first manually import it using:
Expand Down
47 changes: 6 additions & 41 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker Compose reference guide at
# https://docs.docker.com/go/compose-spec-reference/

# Here the instructions define your application as a service called "cli".
# This service is built from the Dockerfile in the current directory.
# You can add other services your application may depend on here, such as a
# database or a cache. For examples, see the Awesome Compose repository:
# https://github.com/docker/awesome-compose
services:
cli:
build:
Expand All @@ -15,35 +6,9 @@ services:
- ./working_dir:/app/docs
- ./templates:/app/templates

# The commented out section below is an example of how to define a PostgreSQL
# database that your application can use. `depends_on` tells Docker Compose to
# start the database before your application. The `db-data` volume persists the
# database data between container restarts. The `db-password` secret is used
# to set the database password. You must create `db/password.txt` and add
# a password of your choosing to it before running `docker compose up`.
# depends_on:
# db:
# condition: service_healthy
# db:
# image: postgres
# restart: always
# user: postgres
# secrets:
# - db-password
# volumes:
# - db-data:/var/lib/postgresql/data
# environment:
# - POSTGRES_DB=example
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
# expose:
# - 5432
# healthcheck:
# test: [ "CMD", "pg_isready" ]
# interval: 10s
# timeout: 5s
# retries: 5
# volumes:
# db-data:
# secrets:
# db-password:
# file: db/password.txt
# a helper pandoc just to easily properly set the volume for local testing.
# use with `docker compose run --rm pandoc <insert pandoc args here>`
pandoc:
image: pandoc/latex
volumes:
- ./working_dir/ssp-render:/data

0 comments on commit 848500d

Please sign in to comment.