You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<article>
<!-- … -->
<PwGitHubStars:stars="pagination.items"></PwGitHubStars>
<p>This is page {{ pagination.pageNumber }}</p>
<!-- … -->
</article>
</template>
<script>
importPwGitHubStarsfrom'./includes/pw-git-hub-stars.vue';exportdefault { data: { layout:'page', title:'Github stars', seo: { description:`Partly for me to big up great projects, and partly as a set of things to check out later.`, changeFreq:'weekly', },// eleventyNavigation: { key: 'github-stars' }, pagination: { data:'githubStars', size:15, },permalink(data) {constparts= [data.page.filePathStem];constpageNumber=data.pagination.pageNumber+1;if (pageNumber ===1) {return`${parts.join('.')}/index.html`; }return`${parts.join('.')}/${pageNumber}.html`; }, }, components: { PwGitHubStars },};
</script>
Eleventy is creating files with the right filenames, but they all have identical content. pagination.pageNumber is 0 for all of them:
If this isn't a user error on my part then I think this might possibly be a Vue plugin issue rather than an Eleventy issue, because if I stick the below content into a github-starz.njk file then the output is as I'd expect (different items on each page):
Can anyone see what I'm doing wrong? A branch demoing the problem can be found here but you won't be able to build it, unfortunately (it relies on a bunch of local environment variables that I can't share, API keys etc).
The text was updated successfully, but these errors were encountered:
I'm using Eleventy 2.0.0-canary.18 and the Vue plugin 0.7.4. My whole
package-lock.json
is here.I'm trying to split https://wolstenhol.me/github-stars up into multiple pages showing 15 items per page. It's using some global data as the source.
You can see how the file is set up here: https://github.com/philwolstenholme/wolstenhol-11ty/blob/github-star-pagination/src/github-stars.vue:
Eleventy is creating files with the right filenames, but they all have identical content.
pagination.pageNumber
is0
for all of them:etc…
If this isn't a user error on my part then I think this might possibly be a Vue plugin issue rather than an Eleventy issue, because if I stick the below content into a
github-starz.njk
file then the output is as I'd expect (different items on each page):Can anyone see what I'm doing wrong? A branch demoing the problem can be found here but you won't be able to build it, unfortunately (it relies on a bunch of local environment variables that I can't share, API keys etc).
The text was updated successfully, but these errors were encountered: