Comments (2)
Hi @Sarctiann
I looked into the issue and the only correct solution currently is to "create a custom layout", this is ultra easy and can be done in 1min.
The steps are:
- On your repo where you have the
_config.yml
file you need to create a folder named "_layouts/" and in that new folder create a file named "default.html" - In that "default.html" past the content of this page.
- Replace this line
<h1>{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
with this line<h1>{{ site.title | default: site.github.repository_name }}</h1>
- And replace this line
<p>{{ page.description | default: site.description | default: site.github.project_tagline }}</p>
with<p>{{ site.description | default: site.github.project_tagline }}</p>
- Save the file ("default.html")
- Wait approx 2mins for the build of your page to be fully done
- Voilà
In you want to remove these changes to get back the original behaviour, simply delete the "_layout/" folder (that normally contains the "default.html" file we created.
For advanced users
If you want to understand the issue, this is due to the parsing of the "index.md" file, when parsed the first header title is use to set the page.title
variable. In the lines I highlighted in the steps below the behaviour is first to check if the markdown as a title then only if not use the title set by the user (and if there isn't use the repository name).
Why not creating a merge request to fix this issue ?
Currently pages aren't Github priority so current merge request seems to be not checked and merged by maintainers.
Secondly I don't know if it's a bug or not, some theme as this "issue" in the HTML code, some don't have this syntax.
Conclusion
Yes there is something weird in the way the HTML of the page template is done, the documentation here is not correct, the theme don't respect the following variables by default.
But there is a solution, not ideal but still.
from leap-day.
Second / altermative solution
There is an other solution, maybe simpler. You can use front matter YAML syntax to "force" the title you want by editing your "index.md".
Find more details on the comment I made here.
from leap-day.
Related Issues (20)
- python highlight
- [email protected] medium vulnerability HOT 1
- maybe dummy issue: can't show posts in _post? HOT 1
- Is there a way to not add h3 to ToC? HOT 4
- Headers get overlapped by default texts HOT 4
- Scroll Issue HOT 3
- Some comments HOT 2
- Left Side menu not visible, when opening the page in phone HOT 2
- Left side menu is over lapping the footer section HOT 3
- Table of Content Should Use Header "id"s If Possible HOT 1
- Content in <details> not rendered correctly HOT 2
- GitHub Pages fails to build site: File to import not found or unreadable: leap-day HOT 1
- Custom CSS does not work anymore HOT 2
- Links to a heading scrolls to positions where that heading is behind the header banner HOT 2
- Left menu issues. HOT 9
- Theme doesn't display correctly on Firefox but it does on Chrome
- No way to get to home page HOT 3
- Left side Menu, <nav>, cannot take Chinese characters into the URLs.
- Left-side "pages" wrapper nav ul HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leap-day.