mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 19:56:41 +02:00
Add option to disable fancy fonts, addressing #57
Also, small README update
This commit is contained in:
17
README.md
17
README.md
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
[](https://github.com/mtn/cocoa-eh-hugo-theme/blob/master/LICENSE)
|
[](https://github.com/mtn/cocoa-eh-hugo-theme/blob/master/LICENSE)
|
||||||
|
|
||||||
**Cocoa Enhanced** is a clean, fast and responsive [Hugo](http://gohugo.io) [theme](https://github.com/spf13/hugoThemes/) with cool typography. The main goal of this theme is to be simple and fast but highly customizable.
|
**Cocoa Enhanced** is a clean, fast, and responsive [Hugo](http://gohugo.io) [theme](https://github.com/spf13/hugoThemes/) with cool typography. The main goal of this theme is to be simple and fast but also highly customizable.
|
||||||
|
|
||||||
You can use this theme either for your blog or your personal website. A demo is available [here](https://kodewolf.com).
|
A demo is available [here](https://kodewolf.com).
|
||||||
|
|
||||||
> This is a fork from the original [Cocoa](https://www.github.com/nishanths/cocoa-hugo-theme) theme, with some improvements.
|
> This is a fork from the original [Cocoa](https://www.github.com/nishanths/cocoa-hugo-theme) theme, with some improvements.
|
||||||
|
|
||||||
@@ -19,8 +19,6 @@ You can use this theme either for your blog or your personal website. A demo is
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Simple but complete, here are the main features of this theme :
|
|
||||||
|
|
||||||
* Possibility to have sections with a header and a list of articles.
|
* Possibility to have sections with a header and a list of articles.
|
||||||
* Possibility to have single pages.
|
* Possibility to have single pages.
|
||||||
* Homepage with latest and best posts.
|
* Homepage with latest and best posts.
|
||||||
@@ -28,10 +26,11 @@ Simple but complete, here are the main features of this theme :
|
|||||||
* Progressive images.
|
* Progressive images.
|
||||||
* Twitter cards support.
|
* Twitter cards support.
|
||||||
* Disqus and Isso support.
|
* Disqus and Isso support.
|
||||||
|
* LaTeX support with MathJax.
|
||||||
|
|
||||||
#### Typography
|
#### Typography
|
||||||
|
|
||||||
The **typography** is what makes Cocoa-EH look cool, here are the fonts used :
|
The **typography** is what makes Cocoa-EH look cool. The fonts used are:
|
||||||
|
|
||||||
* *Nexa Bold* for the blog name, a strong and opinionated font
|
* *Nexa Bold* for the blog name, a strong and opinionated font
|
||||||
* *Raleway* for the titles, light but clearly visible
|
* *Raleway* for the titles, light but clearly visible
|
||||||
@@ -40,7 +39,7 @@ The **typography** is what makes Cocoa-EH look cool, here are the fonts used :
|
|||||||
|
|
||||||
#### Blazing fast
|
#### Blazing fast
|
||||||
|
|
||||||
Everything is made here to make the theme **really fast** to load : inline CSS, deferred Javascript, fonts loaded in an asynchronous way with replacement fonts when they're not loaded, etc. ... Even with a GPRS connection, your blog is readable.
|
Everything is made here to make the theme **really fast** to load: inline CSS, deferred Javascript, fonts loaded in an asynchronous way with replacement fonts when they're not loaded, etc. ... Even with a GPRS connection, your blog is readable.
|
||||||
|
|
||||||
> With gzip enabled, this theme takes less than **400**ms to load entirely, and the content is readable at only **50**ms. Also scores 99/100 on Pagespeed.
|
> With gzip enabled, this theme takes less than **400**ms to load entirely, and the content is readable at only **50**ms. Also scores 99/100 on Pagespeed.
|
||||||
|
|
||||||
@@ -54,7 +53,7 @@ This theme is less minimalist than the original Cocoa, with some new features :
|
|||||||
* Progressive images.
|
* Progressive images.
|
||||||
* Fonts are different : stronger and sharper, with a clear identity.
|
* Fonts are different : stronger and sharper, with a clear identity.
|
||||||
* The font size in articles is higher, the text justified and lines are more spaced.
|
* The font size in articles is higher, the text justified and lines are more spaced.
|
||||||
* More features.
|
* and more...
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@@ -70,7 +69,7 @@ Then, generate your site's files by running:
|
|||||||
hugo -t cocoa-eh
|
hugo -t cocoa-eh
|
||||||
````
|
````
|
||||||
|
|
||||||
If you want a simple blog you can just use the `exampleSite`, however if you desire a more complex website you can build it with the [wiki](https://github.com/mtn/cocoa-eh-hugo-theme/wiki).
|
If you want a simple blog you can just use the `exampleSite`. The [wiki](https://github.com/mtn/cocoa-eh-hugo-theme/wiki) includes helpful details should you need more.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -82,6 +81,8 @@ Pull requests, bug fixes, and new features are welcome!
|
|||||||
4. Push to the branch (`git push origin my-new-feature`)
|
4. Push to the branch (`git push origin my-new-feature`)
|
||||||
5. Create new Pull Request on GitHub
|
5. Create new Pull Request on GitHub
|
||||||
|
|
||||||
|
Please keep each pull request to a single feature -- it's okay to submit multiple pull requests at a time! This makes new features easier to review and merge. For large changes, consider making an issue beforehand to discuss.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Licensed under the MIT License. See the [LICENSE](https://github.com/mtn/cocoa-eh-hugo-theme/blob/master/LICENSE) file for more details.
|
Licensed under the MIT License. See the [LICENSE](https://github.com/mtn/cocoa-eh-hugo-theme/blob/master/LICENSE) file for more details.
|
||||||
|
@@ -710,3 +710,29 @@ kbd {
|
|||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fonts */
|
||||||
|
|
||||||
|
{{ if not .Site.Params.disablefancyfonts }}
|
||||||
|
.wf-raleway-n4-active body,
|
||||||
|
.wf-raleway-n4-active div.header nav ul a,
|
||||||
|
.wf-raleway-n7-active div.main .content .page-heading,
|
||||||
|
.wf-raleway-n2-active div.main .container.f04 .content .num,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h1,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h2,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h3,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h4,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h5,
|
||||||
|
.wf-raleway-n7-active div.main .content .markdown h6 {
|
||||||
|
font-family: 'Raleway';
|
||||||
|
}
|
||||||
|
|
||||||
|
.wf-merriweather-n3-active div.main .content .markdown {
|
||||||
|
font-family: 'Merriweather';
|
||||||
|
}
|
||||||
|
|
||||||
|
.wf-ubuntu-mono-n4-active div.main .content .markdown code,
|
||||||
|
.wf-ubuntu-mono-n4-active div.main .content .markdown pre {
|
||||||
|
font-family: 'Ubuntu Mono';
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
{{ if not .Site.Params.disablefancyfonts }}
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
||||||
<script>
|
<script>
|
||||||
WebFont.load({
|
WebFont.load({
|
||||||
@@ -6,6 +7,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Site.Params.highlightjs }}
|
{{ if .Site.Params.highlightjs }}
|
||||||
<script src="{{ .Site.BaseURL }}js/highlight.min.js" defer></script>
|
<script src="{{ .Site.BaseURL }}js/highlight.min.js" defer></script>
|
||||||
|
Reference in New Issue
Block a user