Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless plugin isn't pulling in the correct content #2667

Closed
mark-reason opened this issue Nov 29, 2022 · 1 comment
Closed

Serverless plugin isn't pulling in the correct content #2667

mark-reason opened this issue Nov 29, 2022 · 1 comment

Comments

@mark-reason
Copy link

I am trying to use the serverless plugin to create events pages on request, however when running 'netlify dev', each event page is showing the same content (the content for the first event).

This is the code for my event template:

---js
{
  pagination: {
    data: "events",
    alias: "event",
    size: 1,
    serverless: "{{ eleventy.serverless.path.url }}",
    addAllPagesToCollections: true, 
  },
  permalink: {
    onrequest: "{{ event.url }}"
  },
}
---

<!DOCTYPE html>
<html dir="ltr" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <h1>{{ event.title }}</h1>
    <p>URL: {{ event.url }}</p>
  </body>
</html>

I have also made a repository with example code - https://github.com/mark-reason/11ty-serverless-events

Any idea what I'm doing wrong here?

Thanks,
Mark

@zachleat zachleat added the feature: 🏙 serverless Eleventy Serverless label Apr 9, 2024
@zachleat
Copy link
Member

zachleat commented Apr 9, 2024

Stale per project slipstream changes in #3074.

@zachleat zachleat closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants