Skip to content

Commit

Permalink
closes #494 by modifying the python script a touch
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart committed Jun 23, 2020
1 parent 3ec9331 commit fb3dacb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ You can also check out [this issue](https://github.com/tlienart/Franklin.jl/issu
## 0.8+ (ongoing)

* `\underline` is not a thing anymore (I don't think anyone was using it) so that it doesn't clash with KaTeX's underline ([#512](https://github.com/tlienart/Franklin.jl/issues/512)); prefer `\style` for such things.
* files ending with `.min.css` are now **not** minified to avoid rare problems where the minifier would actually break an already minified file ([#494](https://github.com/tlienart/Franklin.jl/issues/494))

## v0.8

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Franklin"
uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
authors = ["Thibaut Lienart <[email protected]>"]
version = "0.8.4"
version = "0.8.5"

[deps]
Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
Expand Down
14 changes: 9 additions & 5 deletions src/scripts/minify.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is a simple script using `css_html_js_minify` (available via pip) to compress html and css
# files (the js that we use is already compressed). This script takes negligible time to run.
# This is a simple script using `css_html_js_minify` (available via pip)
# to compress html and css files (the js that we use is already compressed).
# This script takes negligible time to run.

import os
from css_html_js_minify import process_single_html_file as min_html
Expand All @@ -9,26 +10,29 @@

# modify those if you're not using the standard output paths.
if old_folder_structure:
CSS, PUB = "css", "pub"
CSS, PUB = "css", "pub"
html_files = ["index.html"]
for root, dirs, files in os.walk(PUB):
for fname in files:
if fname.endswith(".html"):
html_files.append(os.path.join(root, fname))

css_files = []

for root, dirs, files in os.walk(CSS):
for fname in files:
if fname.endswith(".min.css"):
continue
if fname.endswith(".css"):
css_files.append(os.path.join(root, fname))
else:
html_files = []
css_files = []
css_files = []
for root, dirs, files in os.walk("__site"):
for fname in files:
if fname.endswith(".html"):
html_files.append(os.path.join(root, fname))
if fname.endswith(".min.css"):
continue
if fname.endswith(".css"):
css_files.append(os.path.join(root, fname))

Expand Down

0 comments on commit fb3dacb

Please sign in to comment.