4

I have a GitHub Pages site, and I don't want to use the raw html to develop the site yet because non developers on the team will be pushing.

The problem is that the document.title contains "by [username]" at the end. I want to remove that and just make it be the beginning text.

I already tried title: [custom title] in Jekyll and it still has the organization name at the end.

I am using the Midnight theme.

Thanks!

Cameron
  • 1,049
  • 12
  • 24

1 Answers1

4

As based in comments, you are using the jekyll-midnight-theme, copy the default layout file of the jekyll-theme-midnight repo into _layouts directory in your Jekyll website.

  1. Create the /_layouts directory
  2. Copy https://github.com/pages-themes/midnight/blob/master/_layouts/default.html into /_layouts

Now edit /_layouts/default.html and adjust the <title> HTML tag, in this case removing the "by " part, so this:

 <title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>

replace it with:

  <title>{{ site.title | default: site.github.repository_name }}</title>

Now your website won't include the "by [organization name]" at the end.

marcanuy
  • 23,118
  • 9
  • 64
  • 113
  • Thanks! Works perfectly! Now I can also clean up some of the code in the layout html file that I don't want! – Cameron Jul 19 '17 at 19:15