Giter VIP home page Giter VIP logo

Comments (3)

elmasse avatar elmasse commented on June 5, 2024 1

Glad you've find out a solution. I'll close this issue for now. Please feel free to re open it or create a new in case you have more questions.

BTW, I really love the simplicity of your blog design. It's pure beauty.

from nextein.

elmasse avatar elmasse commented on June 5, 2024

Hi @charlespeters. I'm guessing you want to display a single post in your index file. If that is correct, unfortunately withPost won't work for you. What you can do in that case is to assign a specific category and use it with withPostsFilterBy(inCategory('your-index-only-category')) and display it as it were a list (although it might contain only one item).

The reason this scenario won't work for index is because it's intended to be the entry point. To make withPost to work you need a url that will be attached to a single post (like a permalink).

Maybe another way could be to define the permalink of your post as:

---
page: index
permalink: /
---  

But I'm not sure if that will work as expected. Plus, it looks a bit tricky for me. I'd prefer to use the category solution for displaying a post in index

Let me know if I got this wrong.

Max

from nextein.

charliewilco avatar charliewilco commented on June 5, 2024

Yea that didn't quite do what i'm looking for but i found the first method worked just as well. https://charliewil.co/_src

from nextein.

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.