mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-18 00:52:24 -06:00
Added logo variable to _config.yml which can be set to a path/url
Automatically replaces the title with a logo
This commit is contained in:
parent
6a46a4797e
commit
132cecfea3
@ -17,6 +17,7 @@ title: Just the Docs
|
|||||||
description: A Jekyll theme for documentation
|
description: A Jekyll theme for documentation
|
||||||
baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog
|
baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog
|
||||||
url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
|
#logo: "/assets/images/just-the-docs.png"
|
||||||
|
|
||||||
permalink: pretty
|
permalink: pretty
|
||||||
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
|
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
|
||||||
|
@ -1 +1,5 @@
|
|||||||
{{ site.title }}
|
{% if site.logo %}
|
||||||
|
<div class="site-logo"></div>
|
||||||
|
{% else %}
|
||||||
|
{{ site.title }}
|
||||||
|
{% endif %}
|
||||||
|
@ -153,6 +153,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if variable-exists(logo) {
|
||||||
|
.site-logo {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-image: url($logo);
|
||||||
|
background-position: left center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.menu-button {
|
.menu-button {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
# only Main files contain this front matter, not partials.
|
# only Main files contain this front matter, not partials.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% if site.logo %}
|
||||||
|
$logo: "{{ site.logo | absolute_url }}";
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Import external dependencies
|
// Import external dependencies
|
||||||
//
|
//
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
# only Main files contain this front matter, not partials.
|
# only Main files contain this front matter, not partials.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% if site.logo %}
|
||||||
|
$logo: "{{ site.logo | absolute_url }}";
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Import external dependencies
|
// Import external dependencies
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user