Daniel2805
Daniel2805

Reputation: 77

How to create new content in jekyll homepage

I really wish I could generate a new page like "publications" in the navigation to show my work in progress. I am using jekyll. And you can find my repository here: https://github.com/dangraeber/dangraeber.github.io .

In folder data and _workinprgress, I tried to configurate everything according to my understanding of how things work there. I am sorry for the uninformed question, but I am really new to this.

Best

Daniel

Upvotes: 0

Views: 619

Answers (2)

David
David

Reputation: 1

The problem could be with permalinks. Check that the URL in _data/navigation.yml to your page, and the permalink in the header of your new page in _pages/ is exactly the same (In my case, it is case-sensitive).

Upvotes: 0

iBug
iBug

Reputation: 37317

It seems like you're using academicpages/academicpages.github.io.

You need to add your new collection in your _config.yml for pages to appear.

collections:
  workinprogress:
    output: true
    permalink: /:collection/:path/

Also, you need an "index page" so /workinprogress/ is reachable. There's an example in _pages/portfolio.html that looks like this:

---
layout: archive
title: "Portfolio"
permalink: /portfolio/
author_profile: true
---

{% include base_path %}

{% for post in site.portfolio %}
  {% include archive-single.html %}
{% endfor %}

You can take that file and replace some keywords, it'll (probably) work.

See Jekyll documentation on collections:

If you’d like Jekyll to create a rendered page for each document in your collection, you can set the output key to true in your collection metadata in _config.yml.

Upvotes: 1

Related Questions