Skip to content

Commit

Permalink
🧪 Add MWE for Witiko/markdown#402
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiborisov committed Mar 5, 2024
0 parents commit 1df4ad2
Show file tree
Hide file tree
Showing 10 changed files with 28,692 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alpine:3.19.1

RUN mkdir -p /data/context && mkdir -p /data/context/bin

COPY context-linuxmusl-64/install.sh /data/context/install.sh
COPY context-linuxmusl-64/bin/* /data/context/bin/

RUN cd /data/context \
&& chmod +x install.sh \
&& ./install.sh

ENV PATH=/data/context/tex/texmf-linuxmusl-64/bin:$PATH

# Install Markdown package
RUN apk add --no-cache wget \
&& cd /data/context \
&& wget -4 https://github.com/Witiko/markdown/releases/download/3.4.1/markdown.zip \
&& unzip markdown.zip \
&& mkdir -p tex/texmf-modules \
&& unzip markdown.tds.zip -d tex/texmf-modules \
&& context --generate \
&& rm -rf markdown markdown.zip markdown.tds.zip \
&& apk del --no-cache wget

RUN addgroup -g 1000 context \
&& adduser -u 1000 -G context -D context

USER context
WORKDIR /home/context
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# MWE for [Witiko/markdown issue 402](https://github.com/Witiko/markdown/issues/402)

I've uploaded the built image on Docker Hub for your convinience, but feel free to build it locally if you want (I've included the [`Dockerfile`](Dockerfile)).

Run with:

```shell
docker-compose up
```

You can check the input and output files in [`compile`](compile) folder.

Compiling without use of markdown package runs without any issues.

🙏🏻 Thank you in advance!
4 changes: 4 additions & 0 deletions compile/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Test heading

1. First item
2. Second item
5 changes: 5 additions & 0 deletions compile/index.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\usemodule[t][markdown]

\starttext
\markdownInput{index.md}
\stoptext
Loading

0 comments on commit 1df4ad2

Please sign in to comment.