From 16574186eef6a0381f99f2030b0e618e9f8f10d5 Mon Sep 17 00:00:00 2001 From: malone6 Date: Thu, 21 Sep 2023 18:39:29 +0800 Subject: [PATCH] feat: add previous and next button in content.html (#763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: linkedlist_stack.py 中的peek方法需要判空raise Error 栈空的时候不能再 peek() 。另外由于 pop() 复用了 peek() ,栈空时返回的 None 会传递到 pop() 中的 num ,导致后续的继续执行 self.peek.next 报错等后续问题 * Update linkedlist_stack.py * Update linkedlist_queue.py * Update linkedlist_deque.py * feat: Move the pagination nav above the comments * feat: Move the pagination nav above the comments * Delete docs/overrides/partials/footer.html * Update content.html --------- Co-authored-by: Yudong Jin Co-authored-by: long.ma --- .gitignore | 1 - Dockerfile | 2 +- docs/overrides/partials/content.html | 110 +++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 docs/overrides/partials/content.html diff --git a/.gitignore b/.gitignore index 9d5231be1..190a18d75 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ # mkdocs files .cache/ -/docs/overrides # build /build diff --git a/Dockerfile b/Dockerfile index 7293fa7b0..47b1ebced 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app COPY docs /app/build COPY mkdocs.yml /app/mkdocs.yml -RUN mkdir -p ./build/overrides && mkdocs build +RUN mkdocs build EXPOSE 8000 diff --git a/docs/overrides/partials/content.html b/docs/overrides/partials/content.html new file mode 100644 index 000000000..f13c77fd0 --- /dev/null +++ b/docs/overrides/partials/content.html @@ -0,0 +1,110 @@ + + + +{% if "material/tags" in config.plugins and tags %} + {% include "partials/tags.html" %} +{% endif %} + + +{% include "partials/actions.html" %} + + +{% if "\x3ch1" not in page.content %} +

{{ page.title | d(config.site_name, true)}}

+{% endif %} + + +{{ page.content }} + + +{% if page.meta and ( + page.meta.git_revision_date_localized or + page.meta.revision_date +) %} + {% include "partials/source-file.html" %} +{% endif %} + + +{% include "partials/feedback.html" %} + + + + + +{% include "partials/comments.html" %}