jekyll

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


Solution

  • 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.