Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekyll default page

Tags:

jekyll

How can I change the default starting page? Currently, index.html is always the index of posts.

I like to show the content of my current /about page on index.html and like to have an /articles link to the index of posts instead.

Is copy pasting /about/index.html's content into /index.html the only solution?

like image 984
Christopher Avatar asked Jul 01 '15 16:07

Christopher


People also ask

How do I set my homepage on Jekyll?

You can use gem 'jekyll-redirect-from' in jekyll to set different homepage than index. html and also customize output URL of any xxxx. html. As a result, www.website.com/about will redirect to www.website.com and content of about.

What is Jekyll website?

Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site's look and feel, URLs, the data displayed on the page, and more.


1 Answers

This not really a Jekyll problem, it's more an Information Architecture one.

Your page hierachy is like this :

|-index.html
|-articles.html
|-...

Just add the content you want in index.html or index.md, if you want to write it in markdown.

Create an article.html or md page and just copy the actual content of index.html in it.

Finally if you want to reach your articles page at /articles/, just add permalink: articles/ in the front matter. Otherwise, by default it will be reached at articles.html.

like image 54
David Jacquel Avatar answered Sep 25 '22 15:09

David Jacquel