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

Metadata DB #71

Closed
jakobo opened this issue Nov 22, 2022 · 0 comments · Fixed by #72
Closed

Metadata DB #71

jakobo opened this issue Nov 22, 2022 · 0 comments · Fixed by #72
Assignees
Labels
feature New feature or request

Comments

@jakobo
Copy link
Collaborator

jakobo commented Nov 22, 2022

Discussion: #53

Why

Right now, there are several "query"-like operations difficult to do in outstatic. Some examples:

  • "get all documents, sorted by their publishedAt value"
  • "get the first 5 documents in the posts collection, written by the user Jim"
  • "get all the documents, across all the collections"

It would be unreasonable in even a moderate site (20 pieces of content) to do an FS read on every file, YAML parse the frontmatter, and then perform operations on the merged set of frontmatter data.

Proposed Solution

This issue is tracking the work on a Metadata DB; a file updated on edit/delete and via SWR which contains the most recent copy of metadata from every piece of outstatic content's frontmatter.

  • The sync is unidirectional (files -> metadata db) and dirty data is acceptable, returning cached values
  • A new metadata DB results in a new deployment, which allows getStaticProps / getServerSideProps to refresh their queries
@jakobo jakobo added the feature New feature or request label Nov 22, 2022
@jakobo jakobo self-assigned this Nov 22, 2022
This was referenced Nov 22, 2022
jakobo added a commit that referenced this issue Feb 16, 2023
Implements a first pass at metadata DB, allowing you to build and maintain metadata about your outstatic posts. Metadata can be created from the settings page, as well as on the individual edit/save of items in collections. Introduces a new query syntax to access and read metadata, while still maintaining the static site design outstatic excels at.

Resolves #71 

Co-authored-by: Andre Vitorio <andre@vitorio.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant