Skip to content

Commit

Permalink
adding some information on minify
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart committed Aug 24, 2021
1 parent 8491936 commit 193a099
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ julia> run(`sudo $(npm_cmd()) install highlight.js`)
**Note**: a key advantage of using `NodeJS` for this instead of using `npm` yourself is that it puts the libraries in the "right place" for Julia to find them.

Assuming you have `python3`, Franklin will try to install the python package [`css_html_js_minify`](https://github.com/juancarlospaco/css-html-js-minify) if via `pip3`.

\note{
You **don't have to** install these libraries and you can safely ignore any message suggesting you install those. Also note that if you do want this but it doesn't work locally due to some `node` weirdness or related, things will likely still work if you use GitHub to deploy.
}
12 changes: 10 additions & 2 deletions docs/workflow/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ julia> verify_links()
All internal and external links verified ✓.
```

\note{
This functionality is pretty rudimentary and while it might help you to find internal dead links, for serious work you might still want to do a second pass with a well established link-checker such as [broken-link-checker](https://github.com/stevenvachon/broken-link-checker#readme).
}

### Pre-rendering and compression

The `optimize` function can
Expand All @@ -171,10 +175,14 @@ The `optimize` function can
@@
See `?optimize` for options.

Those two steps may lead to faster loading pages.
Those two steps _may_ lead to faster loading pages.
Note that in order to run them, you will need a couple of external dependencies as mentioned in the [installation section](/index.html#installing_optional_extras).

The `optimize` function is called by default in the `publish` function which can be used to help deploy your website.
\note{
The minifier script (an external python lib) used is far from perfect and can break your website, generally speaking if things work locally but not when you deploy, try disabling it with `optimize(minify=false)`.

Also note that if you use GitHub or GitLab pages, the minification is not needed as these platforms compress the pages themselves.
}

### Publish

Expand Down

0 comments on commit 193a099

Please sign in to comment.