Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
extra head support
Browse files Browse the repository at this point in the history
  • Loading branch information
RDIL committed Dec 16, 2019
1 parent 8935abf commit 4b4138a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Netlify is perfect for deploying PickleCore. The setup is quite easy - just set

## Customization

PickleCore is (probably) the most customizable theme out in the Jekyllverse. Here is a list of keys you can put in your `_config.yml` and what they do:
PickleCore is (most likely) the most customizable-out-of-the-box theme out in the Jekyllverse. Here is a list of keys you can put in your `_config.yml` and what they do:

* `name` - the name of the site (main title)
* `webmanifest` - link to a `manifest.json` or a file with the `.webmanifest` extension (used by Google for web apps, link must be relative to the root page of the site)
Expand All @@ -45,14 +45,14 @@ PickleCore is (probably) the most customizable theme out in the Jekyllverse. Her
* `apple-touch-icon` - the URL of the Apple touch icon for the site if you have one (see [this article](https://www.computerhope.com/jargon/a/appletou.htm) for more info)
* `index_on_google` - `true` or `false` depending if you want your site in Google search results
* `keywords` - an inline list of comma (no spaces) seperated keywords (for SEO) (e.g. `keywords: "hello,world,this,is,my,site"`)
* `images` - stuff for favicons
* `images.tileimage` - the link to the Microsoft tile image
* `images.tileimage` - the link to the Microsoft tile image
* `browserconfigxml` - link to a `browserconfig.xml` for Microsoft-based browsers
* The same thing can be applied to `twitter` with the subkey `image`, and `opengraph` with the subkey `image`
* `twitter` - Twitter meta dictionary
* `username`: your Twitter username as a string (no `@`!)
* `devto` - your [DEV](https://dev.to/) username (if you want it on the sidebar)
* `no_extra_css` - prevent custom stylesheets (see below) from being loaded (defaults to `false`)
* `no_extra_head` - prevent custom metadata (see below) from being loaded (defaults to `false`)

Most of the favicons and images listed here can be made over at https://realfavicongenerator.net

Expand All @@ -65,7 +65,7 @@ and put the hex color on the first line. **Do not** add a newline at the end of

To apply custom CSS, add a file called `_includes/styling/extra.css` and put styles in that file.

Note: this will not work if you specify the `no_extra_css` key in your config.
Note: this will not work if you specify the `no_extra_css` key in your config as `true`.

## Applying Theme Components

Expand Down Expand Up @@ -132,3 +132,9 @@ Example:
<h2>I am in a block!</h2>
</div>
```

### Custom Metadata in `<head>`

To apply custom HTML in `<head>`, add a file called `_includes/metadata/extra.html` and put any HTML in that file.

Note: this will not work if you specify the `no_extra_head` key in your config as `true`.
Empty file added _includes/metadata/extra.html
Empty file.
5 changes: 4 additions & 1 deletion _includes/metadata/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{% if site.browserconfigxml %}
<meta name="msapplication-config" content="{{ site.browserconfigxml }}">
{% endif %}
{% if site.microsoft.tileimage %}
{% if site.images.tileimage %}
<meta name="msapplication-TileImage" content="{{ site.microsoft.tileimage }}">
{% endif %}
{% if site.opengraph.image %}
Expand All @@ -54,3 +54,6 @@
{% if site.twitter.image %}
<meta name="twitter:image" content="{{ site.twitter.image }}">
{% endif %}
{% unless site.no_extra_head %}
{% include metadata/extra.html %}
{% endunless %}

0 comments on commit 4b4138a

Please sign in to comment.