Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add css and js easy customizacion #120

Merged
merged 1 commit into from
Feb 28, 2017
Merged

Add css and js easy customizacion #120

merged 1 commit into from
Feb 28, 2017

Conversation

yamila-moreno
Copy link
Contributor

This PR intends to provide an easy way to extend or modify theme CSS. The PR comes directly from the idea taken from @digitalcraftsman in this thread: https://discuss.gohugo.io/t/how-to-override-css-classes-with-hugo/3033/2

This way, we can leave the theme untouched so it's easier to keep it updated and avoid conflicts. AFAIK, this PR doesn't create new problems to those who have changed the theme.

I hope you find it useful; any comments will be welcome! Thanks for your time :)

@kakawait
Copy link
Owner

Thank again for contribution. It's a great idea and I ever though about adding such mechanism but didn't find time (priority) to add it.

I will check it tomorrow since I don't have any computer around me ATM.

@kakawait kakawait added this to the 0.2.3-ALPHA milestone Feb 26, 2017
Copy link
Owner

@kakawait kakawait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is ok, just some typo on documentation 👍

docs/user.md Outdated
@@ -360,6 +360,8 @@ E.g to display a shortcut to open algolia search window :
| favicon | Your favicon path |
| imageGallery | Display an image gallery at the end of a post which have `photos` variables. (false: disabled, true: enabled) |
| hierarchicalCategories | Define categories will create hierarchy between parents: `categories = ["foo", "bar"]` will consider "bar" a sub-category of "foo". If false it will flat categories. |
| customCSS | Define files with css that override or extend the theme css; they are expected in `static` folder: `customCSS = ["css/mystyles.css"]. |
| customJS | Define files with js that override or extend the theme js; they are expected in `static` folder: `customJS = ["js/myscripts.js"]. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forget to close ` at end of

`customJS = ["js/myscripts.js"].

docs/user.md Outdated
@@ -360,6 +360,8 @@ E.g to display a shortcut to open algolia search window :
| favicon | Your favicon path |
| imageGallery | Display an image gallery at the end of a post which have `photos` variables. (false: disabled, true: enabled) |
| hierarchicalCategories | Define categories will create hierarchy between parents: `categories = ["foo", "bar"]` will consider "bar" a sub-category of "foo". If false it will flat categories. |
| customCSS | Define files with css that override or extend the theme css; they are expected in `static` folder: `customCSS = ["css/mystyles.css"]. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forget to close ` at end of

`customCSS = ["css/mystyles.css"].

@yamila-moreno
Copy link
Contributor Author

Done!! Thanks for reviewing :D

@kakawait kakawait merged commit e4d199b into kakawait:develop Feb 28, 2017
@kakawait
Copy link
Owner

@yamila-moreno on next version 0.4.0-BETA there will be an evolution about customJS and customCSS see https://github.com/kakawait/hugo-tranquilpeak-theme/blob/develop/docs/user.md#add-custom-js-or-css-using-configuration

But old syntax will be supported so you don't need to do anything but if you want to add more attribute you can use the new syntax

ATTENTION currently not merged on master only on develop branch

@yamila-moreno
Copy link
Contributor Author

Very interesting evolution; it'll be easy to adapt to the new system; besides, thanks for the back-compatibility. I'll update as soon as it gets to master :D

Thank you for your effort!

zacbook pushed a commit to zacbook/hugo-tranquilpeak-theme that referenced this pull request Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants