Skip to content

Commit

Permalink
Use README.md as the input to the Docker example
Browse files Browse the repository at this point in the history
  • Loading branch information
earldouglas committed Oct 12, 2024
1 parent e334894 commit 91cf34b
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,16 @@ code blocks are nested within an unordered list:

### Docker

Assuming a file called `example.md` with this content:

```
## A title
```shell
echo "First line..."
```
A standard line.
```shell
echo "Second line"
```
```

Build and run a docker image:

```
docker build -t codedown:dev .
```

Use it to extract `shell` snippets and save in `output.sh`:
Use it to extract `haskell` code blocks and save to `output.hs`:

```
cat example.md | docker run -i codedown:dev shell > output.sh
cat README.md | docker run -i codedown:dev haskell > output.hs
```

## Sections and subsections
Expand Down

0 comments on commit 91cf34b

Please sign in to comment.