clayh53 / tufte-jekyll

Minimal Jekyll blog styled to resemble the look and layout of Edward Tufte's books
MIT License
620 stars 206 forks source link

Page titles #74

Closed netw0rkf10w closed 3 years ago

netw0rkf10w commented 3 years ago

Hi @clayh53,

Thanks for making this beautiful theme!

I observed some potentially undesirable behavior: the title of the landing (or home) page is just "blog", which is... weird. More generally it seems that the website's title, subtitle, as well as description are not taken into account in your theme.

I would suggest to display this information as follows.

For landing page: Title • Subtitle | Description

For example, this is how the official Jekyll website is displayed:

jekyll_home

For other pages: PageTitle | Title • Subtitle

For example:

jekyll_quickstart

Could you please tell me how to make these changes? I can submit a PR if that is of interest.

Thank you very much!

netw0rkf10w commented 3 years ago

Problem solved!

In _includes/head.html, replacing

<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

with

<title>
    {% if page.url != "/"  and page.title %}
    {{ page.title }} | {{ site.title }} &bull; {{ site.subtitle }}
    {% else %}
    {{ site.title }} &bull; {{ site.subtitle }} | {{ site.description }}
    {% endif %}
</title>