Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix titles and headings #204

Merged
merged 5 commits into from
Mar 4, 2021
Merged

Fix titles and headings #204

merged 5 commits into from
Mar 4, 2021

Conversation

akindofyoga
Copy link
Contributor

The If statements to decide the page title and header seemed incorrect. This fixes these.

@akindofyoga akindofyoga changed the title Patch 2 Fix titles and headings Feb 22, 2021
@alshedivat
Copy link
Owner

Thanks for the contribution. Which exact issue does this PR fix?

@akindofyoga
Copy link
Contributor Author

{{ site.title }} was never getting used as the title and heading. The condition if site.title == blank was never true, because blank was not in quotes. In addition, {{ site.title }} is the wrong value to use in this case.

To see the problem, try using the theme with title set as blank.

@alshedivat
Copy link
Owner

@rogerthat94, thanks for pointing this out. Looks like the bug was introduced in this commit. If that's the case, then _layouts/about.html probably has the same issue. Could you please confirm that?

On a stylistic note, how about we switch from {% if site.title == "blank" %} to just {% if site.title %} and flip the true and false branches? I just find it weird that liquid evaluates "" == "blank" to true.

And thanks again for spotting this!

@akindofyoga
Copy link
Contributor Author

We don't want to look for site.title being undefined. We want to check if it's specifically the string "blank"

See

title: blank # the website title (if blank, full name will be used instead)

If you'd rather check {% if site.title %}, we should change _config.yml to comment out the title and say "the website title (if undefined, full name will be used instead)"

@alshedivat alshedivat merged commit 218291b into alshedivat:master Mar 4, 2021
LoryPack pushed a commit to LoryPack/lorypack.github.io that referenced this pull request Mar 4, 2021
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
song-qun pushed a commit to song-qun/song-qun.github.io that referenced this pull request Mar 19, 2021
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
searhein added a commit to searhein/searhein.github.io that referenced this pull request Jun 23, 2021
* 'master' of https://github.com/alshedivat/al-folio: (35 commits)
  Fixes alshedivat#304. Fix bad horizontal template include (alshedivat#305)
  Adds support for image zoom (alshedivat#296)
  Fix project page colors (alshedivat#295)
  Added BibTeX hidden block (alshedivat#293)
  add dblp to social links (alshedivat#270)
  Fix for images (alshedivat#271)
  Added proper instructions in personal webpages (alshedivat#261)
  Added the Programming Group at HSG to labs (alshedivat#254)
  Categories for projects and an optional horizontal project card style (alshedivat#224)
  Change gitcdn link (alshedivat#234)
  Issue 183 (alshedivat#192)
  Update Gemfile (alshedivat#230)
  Add gitlab to social (alshedivat#229)
  Update stale.yml
  Create stale.yml
  Switch favicon to emoji (alshedivat#217)
  Update README.md (alshedivat#216)
  Update README.md
  Update README.md
  Fix titles and headings (alshedivat#204)
  ...

# Conflicts:
#	_bibliography/papers.bib
#	_config.yml
#	_data/coauthors.yml
#	_includes/head.html
#	_layouts/about.html
#	_layouts/bib.html
#	_pages/projects.md
#	_projects/mali.markdown
#	_sass/_base.scss
#	_sass/_themes.scss
#	_sass/_variables.scss
#	_software/feddlib.markdown
#	_teaching/ss20-scientific-machine-learning.markdown
#	_teaching/ws1516-seminar-numII.markdown
MichaelHilton pushed a commit to MichaelHilton/MichaelHilton.github.io that referenced this pull request Jul 22, 2021
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
antchristou pushed a commit to antchristou/antchristou.github.io that referenced this pull request Nov 20, 2023
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
artemyk pushed a commit to artemyk/artemyk.github.io that referenced this pull request Jan 23, 2024
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
artemyk pushed a commit to artemyk/artemyk.github.io that referenced this pull request Jan 23, 2024
* Update head.html

* Update header.html

* Update head.html

* Update header.html

* Update about.html

Co-authored-by: Maruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants