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

How to access the collection of all pages #926

Open
sporto opened this issue Oct 14, 2021 · 4 comments
Open

How to access the collection of all pages #926

sporto opened this issue Oct 14, 2021 · 4 comments
Labels
enhancement Improve the expected

Comments

@sporto
Copy link

sporto commented Oct 14, 2021

I want to integrate lunr.js to search our site like https://booyaa.wtf/2017/adding-search-to-your-cobalt-site-part-two/.
To do this I need to create a json index.

I see there is collections.posts.pages, but we don't have posts in this site.
I cannot seem to find any docs about accessing all pages in the site. E.g. for page in pages or in collections.pages

Is there a way to iterate over all pages in the site?
Thanks

@epage epage added the enhancement Improve the expected label Oct 14, 2021
@epage
Copy link
Member

epage commented Oct 14, 2021

At the moment, there is not a way to access it.

In exposing it, I wonder if we should have a flag to control when to expose it so sites don't pay for it if they don't need it. That could come later as part of some of the optimization ideas I'm wanting to play with,

@jmcph4
Copy link

jmcph4 commented Jun 21, 2022

Any progress on this? It'd be a great addition to the project.

@epage
Copy link
Member

epage commented Jun 21, 2022

Not at this time. My focus has been pulled to other projects. When I do get more attention to devote to cobalt, the highest priority is the refactoring I've started so its easier to add and maintain features like this.

@jmcph4
Copy link

jmcph4 commented Jun 21, 2022

Not at this time. My focus has been pulled to other projects. When I do get more attention to devote to cobalt, the highest priority is the refactoring I've started so its easier to add and maintain features like this.

Understandable and I can empathise -- for what it's worth, this is an insanely smooth tool given what it is and I've found it incredibly useful, so thanks for all of the contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve the expected
Projects
None yet
Development

No branches or pull requests

3 participants