diff --git a/Dockerfile b/Dockerfile index 93ad9c9..5762248 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM nginx:1.19.0-alpine -RUN apk update && apk add bash git python3 make tzdata && rm -rf /var/cache/apk/* -RUN python3 -m pip install requests mistune pygments toml +RUN apk update && apk add bash git python3 make tzdata curl && rm -rf /var/cache/apk/* +#RUN python3 -m pip install requests mistune pygments toml +RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - COPY docker/nginx.conf /etc/nginx/nginx.conf # install locales diff --git a/docker/docker-init.sh b/docker/docker-init.sh index b0905d7..b47c085 100644 --- a/docker/docker-init.sh +++ b/docker/docker-init.sh @@ -5,6 +5,7 @@ cd / rm -rf /blog git clone https://github.com/kianby/blog.git cd /blog +poetry install make # nginx serve diff --git a/makesite.py b/makesite.py index aa95a1c..38f005b 100755 --- a/makesite.py +++ b/makesite.py @@ -53,7 +53,7 @@ locale.setlocale(locale.LC_ALL, "") # initialize markdown -class HighlightRenderer(mistune.HTMLRenderer): +class HighlightRenderer(mistune.Renderer): options = {"escape": False, "hard_wrap": True} def block_code(self, code, lang=None):