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

Using title_separator: "|", page title doesn't display correctly #760

Closed
3 of 5 tasks
billgarrison opened this issue Jan 9, 2017 · 3 comments
Closed
3 of 5 tasks

Comments

@billgarrison
Copy link

  • This is a question about using the theme.
  • I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
  • This is a feature request.
  • I have updated all gems with bundle update.
  • I have tested locally with bundle exec jekyll build.

Environment informations

  • Minimal Mistakes version: 4.1.1
  • github-pages or jekyll gem version: Jekyll gem 3.3.1, Ruby 2.4
  • Operating system: Mac OS 10.11.6

Expected behavior

Expected to see the "|" character display as a separator in the page breadcrumb path when bookmarking in my browser. What appears instead is a blank space.

Steps to reproduce the behavior

  1. In _config.yml, add this line:
    title_separator: "|"
  2. run bundle exec jekyll serve and open browser to localhost:4000
  3. Attempt to bookmark a page in the browser.
  4. Observe that the proposed bookmark title is missing the title separator character of "|".

Interestingly, if I pick a character other than "|" as the title separator, the feature works as expected. E.g.

title_separator: "•" works
title_separator: "&&" works
title_separator: "|" :-(

@mmistakes
Copy link
Owner

mmistakes commented Jan 9, 2017

I haven't tested this yet, but this could be related to YAML. I know you can use | to have it preserve newlines if you do something like:

stats: |
  65 Home Runs
  0.278 Batting Average

Perhaps it's ignoring | when parsing the YAML, which could explain why it's blank. If thats's the case maybe there is a way to escape that character so it shows up. I'd suggest digging into the YAML spec as this appears to be an issue there and not with the theme.

@mmistakes
Copy link
Owner

Did some testing and it does seem like YAML or Liquid or Jekyll is removing the vertical pipe |. What you can do instead is declare it as a HTML entity and then it'll work.

title_separator: "|"

Will give you something like:

<title>Welcome to Jekyll | Minimal Mistakes</title>

@billgarrison
Copy link
Author

billgarrison commented Jan 10, 2017 via email

kkunapuli pushed a commit to kkunapuli/kkunapuli.github.io that referenced this issue May 30, 2019
sumeetmondal pushed a commit to sumeetmondal/sumeetmondal.github.io that referenced this issue Sep 10, 2019
jchwenger pushed a commit to jchwenger/jchwenger.github.io that referenced this issue May 5, 2023
yesterz pushed a commit to yesterz/yesterz.github.io-test that referenced this issue Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants