Merge pull request #98 from meitar/page-titles

Add page titles to `<title>` element, fix relative URLs when custom permalinks are used.
This commit is contained in:
Andrew Banchich 2020-02-01 16:30:17 -05:00 committed by GitHub
commit c7aafb0a15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 36 deletions

View file

@ -1,5 +1,5 @@
<head> <head>
<title>{{ site.title }}</title> <title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<!--[if lte IE 8]><script src="{{ "assets/js/ie/html5shiv.js" | relative_url }}"></script><![endif]--> <!--[if lte IE 8]><script src="{{ "assets/js/ie/html5shiv.js" | relative_url }}"></script><![endif]-->

View file

@ -1,28 +1,18 @@
{% if 'posts' == site.tiles-source %}
{% assign tiles = site.posts %}
{% elsif 'pages' == site.tiles-source %}
{% assign tiles = site.html_pages | where_exp: "item", "item.show_tile != false" %}
{% endif %}
<section id="one" class="tiles"> <section id="one" class="tiles">
{% for post in site.posts limit:site.tiles-count %} {% for tile in tiles limit:site.tiles-count %}
{% if site.tiles-source == 'posts' %}
<article> <article>
<span class="image"> <span class="image">
<img src="{{ post.image }}" alt="" /> <img src="{{ tile.image }}" alt="" />
</span> </span>
<header class="major"> <header class="major">
<h3><a href="{{ post.url | relative_url }}" class="link">{{ post.title }}</a></h3> <h3><a href="{{ tile.url | relative_url }}" class="link">{{ tile.title }}</a></h3>
<p>{{ post.description }}</p> <p>{{ post.description }}</p>
</header> </header>
</article> </article>
{% endif %}
{% endfor %}
{% for page in site.html_pages limit:site.tiles-count %}
{% if site.tiles-source == 'pages' and page.show_tile != false %}
<article>
<span class="image">
<img src="{{ page.image }}" alt="" />
</span>
<header class="major">
<h3><a href="{{ page.url | relative_url }}" class="link">{{ page.title }}</a></h3>
<p>{{ page.description }}</p>
</header>
</article>
{% endif %}
{% endfor %} {% endfor %}
</section> </section>

View file

@ -23,7 +23,7 @@
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
</header> </header>
{% if page.image %}<span class="image main"><img src="{{ site.baseurl }}/{{ page.image }}" alt="" /></span>{% endif %} {% if page.image %}<span class="image main"><img src="{{ site.baseurl }}/{{ page.image }}" alt="" /></span>{% endif %}
<p>{{ content }}</p> {{ content }}
</div> </div>
</section> </section>

View file

@ -361,26 +361,26 @@ Finally, this is a <a href="#">link</a>.</p>
<h3>Image</h3> <h3>Image</h3>
<h4>Fit</h4> <h4>Fit</h4>
<span class="image fit"><img src="assets/images/pic03.jpg" alt="" /></span> <span class="image fit"><img src="{% link assets/images/pic03.jpg %}" alt="" /></span>
<div class="box alt"> <div class="box alt">
<div class="row 50% uniform"> <div class="row 50% uniform">
<div class="4u"><span class="image fit"><img src="assets/images/pic08.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic08.jpg %}" alt="" /></span></div>
<div class="4u"><span class="image fit"><img src="assets/images/pic09.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic09.jpg %}" alt="" /></span></div>
<div class="4u$"><span class="image fit"><img src="assets/images/pic10.jpg" alt="" /></span></div> <div class="4u$"><span class="image fit"><img src="{% link assets/images/pic10.jpg %}" alt="" /></span></div>
<!-- Break --> <!-- Break -->
<div class="4u"><span class="image fit"><img src="assets/images/pic10.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic10.jpg %}" alt="" /></span></div>
<div class="4u"><span class="image fit"><img src="assets/images/pic08.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic08.jpg %}" alt="" /></span></div>
<div class="4u$"><span class="image fit"><img src="assets/images/pic09.jpg" alt="" /></span></div> <div class="4u$"><span class="image fit"><img src="{% link assets/images/pic09.jpg %}" alt="" /></span></div>
<!-- Break --> <!-- Break -->
<div class="4u"><span class="image fit"><img src="assets/images/pic09.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic09.jpg %}" alt="" /></span></div>
<div class="4u"><span class="image fit"><img src="assets/images/pic10.jpg" alt="" /></span></div> <div class="4u"><span class="image fit"><img src="{% link assets/images/pic10.jpg %}" alt="" /></span></div>
<div class="4u$"><span class="image fit"><img src="assets/images/pic08.jpg" alt="" /></span></div> <div class="4u$"><span class="image fit"><img src="{% link assets/images/pic08.jpg %}" alt="" /></span></div>
</div> </div>
</div> </div>
<h4>Left &amp; Right</h4> <h4>Left &amp; Right</h4>
<p><span class="image left"><img src="assets/images/pic09.jpg" alt="" /></span>Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.</p> <p><span class="image left"><img src="{% link assets/images/pic09.jpg %}" alt="" /></span>Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.</p>
<p><span class="image right"><img src="assets/images/pic10.jpg" alt="" /></span>Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.</p> <p><span class="image right"><img src="{% link assets/images/pic10.jpg %}" alt="" /></span>Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.</p>
<!-- Box --> <!-- Box -->
<h3>Box</h3> <h3>Box</h3>

View file

@ -23,7 +23,7 @@ nav-menu: true
<section id="two" class="spotlights"> <section id="two" class="spotlights">
<section> <section>
<a href="generic.html" class="image"> <a href="generic.html" class="image">
<img src="assets/images/pic08.jpg" alt="" data-position="center center" /> <img src="{% link assets/images/pic08.jpg %}" alt="" data-position="center center" />
</a> </a>
<div class="content"> <div class="content">
<div class="inner"> <div class="inner">
@ -39,7 +39,7 @@ nav-menu: true
</section> </section>
<section> <section>
<a href="generic.html" class="image"> <a href="generic.html" class="image">
<img src="assets/images/pic09.jpg" alt="" data-position="top center" /> <img src="{% link assets/images/pic09.jpg %}" alt="" data-position="top center" />
</a> </a>
<div class="content"> <div class="content">
<div class="inner"> <div class="inner">
@ -55,7 +55,7 @@ nav-menu: true
</section> </section>
<section> <section>
<a href="generic.html" class="image"> <a href="generic.html" class="image">
<img src="assets/images/pic10.jpg" alt="" data-position="25% 25%" /> <img src="{% link assets/images/pic10.jpg %}" alt="" data-position="25% 25%" />
</a> </a>
<div class="content"> <div class="content">
<div class="inner"> <div class="inner">