GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Attaching references after the build · Issue #420 · contentlayerdev/contentlayer

Attaching references after the build #420

New issue
Copy link
New issue
Copy link
Open
Open
Attaching references after the build#420
Copy link
Labels
meta: never-staleneeds-researchtopic: schema
Milestone
Pre-1.0

Description

@seancdavis
seancdavis
opened on Apr 11, 2023
Issue body actions

The simple version of this is that I have two document types and I want to cache some static field on a document after the build has completed.

For example, let's say I have tags and posts, and I want a tag object to have a postCount attribute that caches the number of posts to which the tag was applied.


The more complex example is to be able to "hydrate" references without needing to write my own transformer function.

In the example above, posts would have a tags field reference. But I'd love if what were returned was of type Tag[] rather than string[].


Having both together would be ideal.

Activity

  1. schickling
    added
    needs-research
    topic: schema
    meta: never-stale
    on Apr 24, 2023
  2. schickling
    added this to the Pre-1.0 milestone on Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta: never-staleneeds-researchtopic: schema

    Type

    No type

    Projects

    No projects

      Milestone

      • Pre-1.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.