Code Monkey home page Code Monkey logo

Comments (5)

parkr avatar parkr commented on June 7, 2024

Consider using a different YAML front-matter item:

In your post:

---
title: My upcoming post
written: false
permalink: THIS-CRAZY-UNGUESSABLE-LINK-HAHAHAHOIAENFOEA
---

This post is unwritten

Now list the posts, but showing only those you want to show:

<ul>
{% for post in site.posts %}
  <li>
  {% if post.written %}
    <a href="{{ post.url }}">{{ post.title }}</a>
  {% else %}
    {{ post.title }} (coming soon)
  {% endif %}
  </li>
{% endfor %}
</ul>

from jekyll-help.

staxmanade avatar staxmanade commented on June 7, 2024

Thanks for the info - that could work at the post level, but I have the following issues with it.

  1. The series component allows me to just include {% include series.html %} anywhere and it generates the series
  2. I would rather not duplicate code like this within blog-post content if possible. Would love to find a way to abstract out the series concept from the posts...
  3. I'm not sure how to get what I want with that example and not have the future posts arrive in the rss feed and the RecentPosts section on the right of the page.

from jekyll-help.

parkr avatar parkr commented on June 7, 2024

You'll like collections: jekyll/jekyll#2199

from jekyll-help.

staxmanade avatar staxmanade commented on June 7, 2024

Thanks, I'll be patient and wait to take a look at this.

For now I may just go with what I have and not worry about showing the up-and-coming posts. Since the tool will automatically re-generate the series section anyway.

Thanks!

from jekyll-help.

troyswanson avatar troyswanson commented on June 7, 2024

Closing this out. I think this is a fantastic use case for collections, though. We should write a tutorial on how to do this once 2.0 is finally released.

from jekyll-help.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.