'Set an homepage and create a link to redirect to an other project with Jekyll/Github pages
I must have missed the informations but I don't know how do two things with jekyll and Github pages...
First question:
With the minima theme, my homepage is the index.md with the layout default :
---
layout: default
title: Homepage
---
I didn't changed the default.html. The content of my index.md is well displayed as my homepage, but a new tab was created in the navigation bar with the title " Homepage "... There is a way to display my homepage without created a new tab in the navigation bar ?
Second question :
I create a file resume.md to create a new tab in the navigation bar with " resume " as title :
---
layout: default
title: Resume
---
A resume tab was created. But I would like that when I click on it, this tab redirect me to my other project Github pages which is my resume. I don't know how to do that...
Can you help me with these to problems ?
Solution 1:[1]
Find the solution to my first problem :
In the _config.yml file, uncomment the #header_pages. That allow to change the order of the navigation ( an other problem that I have... ) and not display the homepage tab in the navigation bar.
Still the second problem.
Solution 2:[2]
Regarding question two:
You could try using Jekyll plugin jekyll-redirect-from [1] to create a page on your website to redirect to another URL [2].
Sometimes, you may want to redirect a site page to a totally different website. This plugin also supports that with the redirect_to key:
title: My amazing post
redirect_to: http://www.github.com
[1] https://github.com/jekyll/jekyll-redirect-from
[2] https://github.com/jekyll/jekyll-redirect-from#redirect-to
Solution 3:[3]
I was in the same sceneraio before. Specifically, I have my personal home page setup on github. Meanwhile, I aslo have two seperate projects hosted at two differnt urls, which I want to show them as hyperlinked navigation tabs on my homepage as well.
The solution I used is to cutomize the navigation tab setion in the default.html as below :
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/projects">Projects</a></li>
<li><a href="https://projection1.example.com/" target="_blank">MyProject1</a></li>
<li><a href="https://projection2.example.com/" target="_blank">MyProject2</a></li>
</ul>
</nav>
you can replace the url above with your own external link. Setting target="_blank" will open the link in a new page when you click on the hyperlinked tab (i.e. MyProject1 or MyProject2).
FYI, here is my account:https://trencyclopedia.github.io/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Kin |
| Solution 3 | eric R |
