Org: HTML, use compressed CSS
This commit is contained in:
parent
afc4233c10
commit
882295ecde
|
@ -6789,7 +6789,7 @@ Suffice to say I've snatched it, with a few of my own tweaks applied.
|
|||
"<script>\n"
|
||||
(f-read-text (expand-file-name "misc/org-css/main.js" doom-private-dir))
|
||||
"</script>\n<style>\n"
|
||||
(f-read-text (expand-file-name "misc/org-css/main.css" doom-private-dir))
|
||||
(f-read-text (expand-file-name "misc/org-css/main.min.css" doom-private-dir))
|
||||
"</style>"))
|
||||
(when org-fancy-html-export-mode
|
||||
(setq org-html-style-default org-html-style-fancy)))
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((scss-mode . ((after-save-hook . (lambda ()
|
||||
(shell-command-to-string "sassc main.scss main.css")
|
||||
(shell-command "./build.sh")
|
||||
(org-html-reload-fancy-style))))))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#+title: Pile Theme
|
||||
#+property: header-args:shell :tangle build.sh :shebang "#!/usr/bin/env bash" :comments none
|
||||
|
||||
A sass-based set of styles to be used by Org when exporting to HTML.
|
||||
=main.scss= is compiled to =main.css= which is then inserted into the ~<head>~ of
|
||||
|
@ -17,6 +18,14 @@ To build =main.css= and =main.js=, I simply run
|
|||
sassc main.scss main.css
|
||||
#+end_src
|
||||
|
||||
A minified CSS file would be nice to have too.
|
||||
#+begin_src shell
|
||||
sassc --style compressed main.scss main.min.css
|
||||
if command -v csso &> /dev/null; then
|
||||
csso main.min.css -o main.min.css
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
Then for combining the JS
|
||||
|
||||
#+begin_src shell
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
sassc main.scss main.css
|
||||
|
||||
sassc --style compressed main.scss main.min.css
|
||||
if command -v csso &> /dev/null; then
|
||||
csso main.min.css -o main.min.css
|
||||
fi
|
||||
|
||||
ls _*.js | sort -V | xargs cat > main.js
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue