Skip to content

Commit

Permalink
Minify HTML & CSS (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed May 28, 2022
1 parent 072e087 commit 26acb80
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 14 deletions.
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.
File renamed without changes.
11 changes: 9 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ watch:
- includes

plugins:
- minify:
minify_html: true
htmlmin_opts:
remove_comments: true
minify_css: true
css_files:
- assets/stylesheets/extra.css
- i18n:
default_language: en
material_alternate: true
Expand Down Expand Up @@ -133,8 +140,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

0 comments on commit 26acb80

Please sign in to comment.