aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2018-01-18 05:45:32 +0000
committerclarkzjw <[email protected]>2018-01-18 05:45:32 +0000
commite86bd1e4e9e31a4582a6a130f90c44f022a9afd3 (patch)
tree412f0e53e17040d332ee1f755294aa8f93eddc3d /rss.xml
parentfd0afd9e9e9e8b87cf16ac5ae4cb0ab6be6b494d (diff)
downloadblog.jinwei.me-e86bd1e4e9e31a4582a6a130f90c44f022a9afd3.tar.gz
Thu Jan 18 05:45:32 UTC 2018
Diffstat (limited to 'rss.xml')
-rw-r--r--rss.xml28
1 files changed, 1 insertions, 27 deletions
diff --git a/rss.xml b/rss.xml
index f71edd6..1f49e6e 100644
--- a/rss.xml
+++ b/rss.xml
@@ -130,34 +130,8 @@ Dockerfile中生成静态html网页,然后在构建的过程中将静态网页
130之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是 130之前我们为了得到静态html文件,可能得选用一个python的基础镜像,然后再apt/apk安装一些必要的编译工具,最终只是为了几百kb的html文件,但是
131构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。目前我 131构建的镜像已经上百MB了。有了multi stage build之后,这个问题便非常好地被解决了。看了下面的Dockerfile之后,整体思路就非常清晰了。目前我
132在本地写完rst文本,然后git push之后,CircleCI会自动进行Dockerfile的构建,然后将编译生成的静态html推送到gh-pages分支。 132在本地写完rst文本,然后git push之后,CircleCI会自动进行Dockerfile的构建,然后将编译生成的静态html推送到gh-pages分支。
133FROM python:3.6.0 as builder
134LABEL maintainer=clarkzjw&lt;[email protected]&gt;
135RUN pip install virtualenv
136COPY requirements.txt /app/requirements.txt
137COPY bootstrap.py /app/bootstrap.py
138RUN /app/bootstrap.py
139ADD . /app
140WORKDIR /app
141RUN /bin/bash -c &#34;source /app/.venv/bin/activate &amp;&amp; make html &amp;&amp; make rss &amp;&amp; cp rss.xml _build/html&#34;
142
143
144FROM alpine:latest
145RUN sed -i &#39;s/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g&#39; /etc/apk/repositories
146RUN apk add --update git openssh-client &amp;&amp; rm -rf /var/cache/apk/*
147WORKDIR /html
148ENV COMMIT_USER=&#34;clarkzjw&#34;
149ENV COMMIT_EMAIL=&#34;[email protected]&#34;
150ARG GIT_TOKEN=&#34;&#34;
151RUN git config --global user.email $COMMIT_EMAIL &amp;&amp; git config --global user.name $COMMIT_USER
152RUN git clone https://clarkzjw:[email protected]/clarkzjw/blog.jinwei.me.git /html &amp;&amp; git checkout gh-pages
153COPY --from=builder /app/_build/html /html
154RUN echo &#34;`date`&#34; &gt; /html/.lastmodify &amp;&amp; git add -A &amp;&amp; git commit -m &#34;`date`&#34; &amp;&amp; git push origin gh-pages
155
156
157FROM nginx:alpine
158COPY --from=builder /app/_build/html /usr/share/nginx/html
159
160 133
134
161另外一个问题是博客的RSS。由于Sphinx最初的设计是作为一个文档生成工具,目前市面上有的和Sphinx结合的RSS生成工具大致有: 135另外一个问题是博客的RSS。由于Sphinx最初的设计是作为一个文档生成工具,目前市面上有的和Sphinx结合的RSS生成工具大致有:
162 136
163Sphinx-contrib模块中的 feed 137Sphinx-contrib模块中的 feed
Powered by cgit v1.2.3 (git 2.41.0)