Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minify HTML & CSS #1351

Merged
merged 1 commit into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mkdocs-material = {path = "./mkdocs-material"}
mkdocs-static-i18n = "*"
mkdocs-git-revision-date-localized-plugin = "*"
typing-extensions = "*"
mkdocs-minify-plugin = "*"

[dev-packages]
scour = "*"
Expand Down
46 changes: 36 additions & 10 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc
- `git submodule init`
- `git submodule update docs/assets/brand`
2. Install [Python 3.6+](https://www.python.org/downloads/)
3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n mkdocs-git-revision-date-localized-plugin typing-extensions`
3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin typing-extensions`
4. Serve the site locally: `mkdocs serve`
- The site will be available at `http://localhost:8000`
- You can build the site locally with `mkdocs build`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ watch:
- includes

plugins:
- minify:
minify_html: true
htmlmin_opts:
remove_comments: true
- i18n:
default_language: en
material_alternate: true
Expand Down Expand Up @@ -133,8 +137,8 @@ markdown_extensions:
toc_depth: 4

extra_javascript:
- javascripts/mathjax.js
- javascripts/feedback.js
- assets/javascripts/mathjax.js
- assets/javascripts/feedback.js

nav:
- Home: 'index.md'
Expand Down
2 changes: 1 addition & 1 deletion theme/overrides/home.en.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block extrahead %}
<link rel="stylesheet" href="{{ 'overrides/home.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/home.css' | url }}">
<link rel="me" href="https://aragon.sh/@jonah">
<link rel="me" href="https://fosstodon.org/@freddy">
<link rel="me" href="https://mastodon.social/@dngray">
Expand Down