Skip to content

Problems with duplicate or out of date content with aurora serve #12

@richard5mith

Description

@richard5mith

Bug

When running aurora serve, it's not always generating the site from scratch each time.

I've encountered the following issues:

  • My homepage not showing the latest content, even if the individual post page does
  • My homepage showing the same single post (I only have one post right now) twice, like an old version and new version of it.
  • The tags page showing the same post twice.
  • If you rename a post file to change the date, not then seeing that new date on my homepage post list.

If I exit out of the serve and run it again, it all gets fixed. So the render process is working correctly, but somewhere along the line it's remembering stuff from it's previous run.

Also note in my partial post I have to do content or post.content to make it work everywhere. There's inconsistency on how that gets filled in, because on the post page it makes the content available as content, but everything else is in the post dictionary apart from content. But when you loop through site.posts it becomes post.content. It would be good if post pages also put it into post.content so you could more easily share templates.

Minimal Reproducible Example

My templates/index.html is:

<section class="h-feed">
    {% for post in site.posts %}
        {% include '_layouts/_partial_post.html' %}
    {% endfor %}
</section>

My layouts/post.html is:

---
layout: default
---
{% include '_layouts/_partial_post.html' %}

And the layouts/_partial_post.html is:

<p class="post-date">posted <a href="{{ post.url }}"><time datetime="{{ post.date | date_to_xml_string }}">{{ post.date | long_date }}</time></a></p>
<h1>{{ post.title }}</h1>

<section class="content">
    {{ content or post.content }}
</section>

{% if post.tags %}
<p>
    {% for tag in post.tags %}
        <a href="/tag/{{ tag.lower() }}" class="p-tag">{{ tag }}</a>
    {% endfor %}
</p>
{% endif %}

Additional

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions