parent
e182b6ee00
commit
83012b0002
|
@ -0,0 +1,64 @@
|
|||
FROM ubuntu:latest
|
||||
|
||||
# Don't prompt during any installation
|
||||
# when using apt
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update the system
|
||||
RUN apt update
|
||||
RUN apt upgrade -y
|
||||
|
||||
# Install dependencies
|
||||
RUN apt install mkdocs pandoc git -y
|
||||
|
||||
RUN apt install texlive -y
|
||||
|
||||
RUN apt install python3-pip -y
|
||||
RUn pip install pymdown-extensions mkdocs-bootswatch-classic
|
||||
# RUn pip install mkdocs-exclude-search
|
||||
RUn pip install mkdocs-exclude
|
||||
RUN pip install mkdocs-material
|
||||
RUN pip install mkdocs-material-extensions
|
||||
|
||||
# RUN pip install mkdocs-material
|
||||
|
||||
# Install stuff to build pandoc-plot
|
||||
# RUN apt install curl -y
|
||||
# RUn /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
# RUN brew install pandoc-plot
|
||||
# WORKDIR /tmp
|
||||
# RUN git clone https://github.com/LaurentRDC/pandoc-plot
|
||||
# WORKDIR pandoc-plot
|
||||
# RUN apt install cabal-install haskell-stack -y
|
||||
# RUN cabal update
|
||||
# RUN cabal install
|
||||
# RUN stack install.
|
||||
COPY pandoc-plot /bin/.
|
||||
|
||||
RUN groupadd tlang --gid 1000
|
||||
RUN useradd tlang --uid 1000 --gid 1000
|
||||
|
||||
|
||||
# TODO: Install mkdocs plugins
|
||||
# TODO: install latex stuff
|
||||
|
||||
WORKDIR /home/tlang
|
||||
|
||||
|
||||
# Just copy across the startup
|
||||
# script and make it executable
|
||||
COPY dockermake.sh .
|
||||
RUN chown tlang:tlang dockermake.sh
|
||||
RUN chmod +x dockermake.sh
|
||||
|
||||
|
||||
|
||||
# RUN apt install wget -y
|
||||
# RUN wget https://github.com/LaurentRDC/pandoc-plot/releases/download/1.7.0/pandoc-plot-Linux-x86_64-static.zip
|
||||
# RUN unzip -v *.zip
|
||||
|
||||
# Switch to the tlang user
|
||||
USER tlang
|
||||
|
||||
# Run enrtypoint
|
||||
CMD ./dockermake.sh
|
17
README.md
17
README.md
|
@ -27,4 +27,19 @@ Once you have finished making your changes in the files in `docs_src/`, please t
|
|||
|
||||
This should produce an updated file in `docs/` with the same name as the one you edited in `docs_src/`, **commit BOTH files** please.
|
||||
|
||||
Then you're done!
|
||||
Then you're done!
|
||||
|
||||
|
||||
## Docker
|
||||
|
||||
First build the image using:
|
||||
|
||||
```bash
|
||||
sudo docker build . -t tlangdocs
|
||||
```
|
||||
|
||||
Then run the build process whenever you need to:
|
||||
|
||||
```bash
|
||||
sudo docker run -v $(pwd):/home/tlang/docs:z tlangdocs:latest
|
||||
```
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
echo "Now starting entrypoint..."
|
||||
|
||||
cd docs/
|
||||
|
||||
echo "Converting markdown..."
|
||||
./makemarkdown.sh
|
||||
|
||||
echo "Converting markdown... [done]"
|
||||
|
||||
|
||||
echo "Build the website now..."
|
||||
python3 -m mkdocs build -d /website
|
||||
echo "Build the website now... [done]"
|
||||
|
||||
echo "Building book..."
|
||||
./makebook.sh
|
||||
./makebook.sh
|
||||
echo "Building book... [done]"
|
Loading…
Reference in New Issue