-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Permalink DuplicatePermalinkOutputError when using .webc
with pagination in 2.0.0-canary.16
#36
Comments
FWIW the custom dir input/output configuration in |
Update! This is caused by the fact that the |
For other people coming across this, you can achieve the same without having to rely on a nested rendering engine as follows:
|
Just for future visitors this bug was fixed with WebC v0.7.0! #27 No workaround needed! |
I am going to move this over to the Eleventy WebC plugin repo, thanks! |
My bad! Was still trying to find my way around the org structure at the time |
Hey, has this regressed? I've been getting the duplicate files error with the current versions of Eleventy & WebC. https://github.com/robb-j/eleventy-webc-pagination-permalink-repro I'm trying to do a permalink with pagination and I can't get it working layout: html.webc
pagination:
data: members.users
size: 1
alias: member
resolve: values
permalink: 'share/{{ member.username | hash }}/index.html' |
@robb-j the takeaway here is that you can’t use |
Hey @zachleat, I've tried that but it still doesn't seem to be working? I tried in the repro repo, so my webc page is this now:
paginating this data file: {
"users": [
{ "username": "geoff-testington" },
{ "username": "jess-smith" },
{ "username": "phil-wang" }
]
} but I'm still getting the DuplicatePermalinkOutputError:
looking with
|
I don't understand how to make use of "no workaround needed" solution. I tried this:
I still have the I've read it has to be WebC syntax but that looks to me like a combination of HTML, WebC, & JavaScript syntax, and very much like a hacky workaround. I'm probably doing something wrong. I don't see any reason not to just use Liquid for the files that need pagination with a dynamic permalink. |
I couldn't quickly get any of the above suggestions to work, nor did I find the syntax palatable 😬, so let me add another suggestion in case it can help someone out. Starting with Eleventy 3.0, you can use JS Frontmatter, this allowed me to build the permalink for pagination use as shown here:
|
Describe the bug
When rendering a paginated page that is a
.webc
component, I'm getting a DuplicatePermalinkOutputError. It seems to work as expected withnjk
or other rendering engines (from what I can tell). This feels very similar to 11ty/eleventy#2333, but seeing that was confirmed fixed, I'm not sure if it's the exact same cause.To Reproduce
Setup the following structure:
with the following contents:
src/_data/test.json
src/index.webc
.eleventy.js
When you try building the site with eleventy, witness the following error:
Expected behavior
By changing
.webc
to.njk
or another rendering engine, note how it works as expected:WebC should work the same here
Environment:
The text was updated successfully, but these errors were encountered: