From eaf172edb7a4250ec40ddb9d6f50bac47a1a9c81 Mon Sep 17 00:00:00 2001 From: Tobias Watzl Date: Mon, 26 Aug 2019 01:50:38 +0200 Subject: [PATCH 1/2] Added empty add-on.css and add-on.js files and extended the documentation to explain their purpose. --- README.md | 5 +++++ static/css/add-on.css | 6 ++++++ static/js/add-on.js | 6 ++++++ 3 files changed, 17 insertions(+) create mode 100644 static/css/add-on.css create mode 100644 static/js/add-on.js diff --git a/README.md b/README.md index dbf64596..afab2403 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,11 @@ _false_ will turn a feature **off**. It is structured as follows: └── .Social // Controls Links to Social Media ``` +### Custom JavaScript and CSS + +You can adapt this theme according to your preferences using your own JS or CSS code. +To do this your can write your code in `static/css/add-on.css` and `static/js/add-on.js`. + ### Hugo's Built-In Server To see a live version of your site locally, use the following command: diff --git a/static/css/add-on.css b/static/css/add-on.css new file mode 100644 index 00000000..8796d53e --- /dev/null +++ b/static/css/add-on.css @@ -0,0 +1,6 @@ +/* + This css file is for individual users to restyle items for their personal site, + or for the implementation of features specifically for their site. Anything that + is an official part of the theme (ex. Pull Requests) should be included in main.css + and follow the formatting and style given. +*/ diff --git a/static/js/add-on.js b/static/js/add-on.js new file mode 100644 index 00000000..da67d15c --- /dev/null +++ b/static/js/add-on.js @@ -0,0 +1,6 @@ +/* + This js file is for individual users to modify the scripts for their personal site, + or for the implementation of features specifically for their site. Anything that + is an official part of the theme (ex. Pull Requests) should be included in main.js + and follow the formatting and style given. +*/ From 797304472719117987397c05aa12ae5a46242af2 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Mon, 26 Aug 2019 10:59:14 +0200 Subject: [PATCH 2/2] Removed references to add-on.* --- README.md | 3 ++- exampleSite/static/css/add-on.css | 6 ------ exampleSite/static/js/add-on.js | 6 ------ layouts/partials/head.html | 1 - layouts/partials/scripts.html | 1 - static/css/add-on.css | 6 ------ static/js/add-on.js | 6 ------ 7 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 exampleSite/static/css/add-on.css delete mode 100644 exampleSite/static/js/add-on.js delete mode 100644 static/css/add-on.css delete mode 100644 static/js/add-on.js diff --git a/README.md b/README.md index afab2403..99d7a04a 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,8 @@ _false_ will turn a feature **off**. It is structured as follows: ### Custom JavaScript and CSS You can adapt this theme according to your preferences using your own JS or CSS code. -To do this your can write your code in `static/css/add-on.css` and `static/js/add-on.js`. +To do this your can add your custom scripts to the `cssFiles` and `jsFiles` +parameters in *config.toml*. ### Hugo's Built-In Server diff --git a/exampleSite/static/css/add-on.css b/exampleSite/static/css/add-on.css deleted file mode 100644 index 8796d53e..00000000 --- a/exampleSite/static/css/add-on.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - This css file is for individual users to restyle items for their personal site, - or for the implementation of features specifically for their site. Anything that - is an official part of the theme (ex. Pull Requests) should be included in main.css - and follow the formatting and style given. -*/ diff --git a/exampleSite/static/js/add-on.js b/exampleSite/static/js/add-on.js deleted file mode 100644 index da67d15c..00000000 --- a/exampleSite/static/js/add-on.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - This js file is for individual users to modify the scripts for their personal site, - or for the implementation of features specifically for their site. Anything that - is an official part of the theme (ex. Pull Requests) should be included in main.js - and follow the formatting and style given. -*/ diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a229fc26..ca637803 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -18,7 +18,6 @@ {{ $mainCSSOptions := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }} {{ $style := resources.Get "scss/main.scss" | resources.ToCSS $mainCSSOptions | resources.Fingerprint }} - {{ else }} {{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 79b9354a..65065d08 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -10,7 +10,6 @@ - {{ else }} {{ end }} diff --git a/static/css/add-on.css b/static/css/add-on.css deleted file mode 100644 index 8796d53e..00000000 --- a/static/css/add-on.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - This css file is for individual users to restyle items for their personal site, - or for the implementation of features specifically for their site. Anything that - is an official part of the theme (ex. Pull Requests) should be included in main.css - and follow the formatting and style given. -*/ diff --git a/static/js/add-on.js b/static/js/add-on.js deleted file mode 100644 index da67d15c..00000000 --- a/static/js/add-on.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - This js file is for individual users to modify the scripts for their personal site, - or for the implementation of features specifically for their site. Anything that - is an official part of the theme (ex. Pull Requests) should be included in main.js - and follow the formatting and style given. -*/