Rename `site.image` to `site.logo` for parity with jekyll-seo-tag plugin
- Describe site-wide elements in _config.yml
This commit is contained in:
parent
4d8b9c832d
commit
42739b5eed
13
README.md
13
README.md
|
@ -64,7 +64,18 @@ Basically Basic is a [Jekyll theme](https://jekyllrb.com/docs/themes/) meant as
|
|||
|
||||
## Configuration
|
||||
|
||||
Configuration of site-wide elements (`lang`, `title`, `description`, `image`, `author`, etc.) happens in your project's `_config.yml`. See the [example configuration](example/_config.yml) in this repo for reference.
|
||||
Configuration of site-wide elements (`lang`, `title`, `description`, `logo`, `author`, etc.) happens in your project's `_config.yml`. See the [example configuration](example/_config.yml) in this repo for additional reference.
|
||||
|
||||
| | Description |
|
||||
| ------------------ | -------------------------------------------------------------------- |
|
||||
| `lang` | Used to indicate the language of text (e.g., en-US, en-GB, fr) |
|
||||
| `title` | Your site's title (e.g., Dungan's Awesome Site) |
|
||||
| `description` | Short site description (e.g., A blog about grasshopper mash) |
|
||||
| `url` | The full URL to your site (e.g., https://groverloaf.org) |
|
||||
| `author` | Global author information (see below) |
|
||||
| `logo` | Path to a site-wide logo (e.g., /assets/your-company-logo.png) |
|
||||
| `twitter_username` | Site-wide Twitter username, used as a link in sidebar |
|
||||
| `github_username` | Site-wide GitHub username, used as a link in sidebar |
|
||||
|
||||
### Skin
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% if site.image contains '://' %}
|
||||
{% assign site_image = site.image %}
|
||||
{% if site.logo contains '://' %}
|
||||
{% assign site_logo = site.logo %}
|
||||
{% else %}
|
||||
{% assign site_image = site.image | relative_url %}
|
||||
{% assign site_logo = site.logo | relative_url %}
|
||||
{% endif %}
|
||||
|
||||
<header id="masthead">
|
||||
|
@ -10,18 +10,18 @@
|
|||
{% if page.url == '/' %}
|
||||
<h1 class="site-title">
|
||||
<a href="{{ '/' | relative_url }}">
|
||||
{% if site.image %}<img src="{{ site_image }}" alt="" class="site-image">{% endif %}
|
||||
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
|
||||
<span>{{ site.title | escape }}</span>
|
||||
</a>
|
||||
</h1>
|
||||
{% else %}
|
||||
<p class="site-title">
|
||||
<a href="{{ '/' | relative_url }}">
|
||||
{% if site.image %}<img src="{{ site_image }}" alt="" class="site-image">{% endif %}
|
||||
{% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
|
||||
<span>{{ site.title | escape }}</span>
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.site-image {
|
||||
.site-logo {
|
||||
width: $site-image-width;
|
||||
height: $site-image-height;
|
||||
margin-right: 0.5rem;
|
||||
|
|
|
@ -25,7 +25,7 @@ author:
|
|||
picture: https://api.adorable.io/avatars/285/johndoe.png
|
||||
twitter_username: Towlette_Pettetucci
|
||||
github_username: Towlette_Pettetucci
|
||||
image: /assets/images/100x100.png # ~100x100px
|
||||
logo: /assets/images/100x100.png # ~100x100px
|
||||
|
||||
# Build settings
|
||||
markdown: kramdown
|
||||
|
|
Loading…
Reference in New Issue