empress / empress/broccoli-static-site-json

Pass custom options to serializer?

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Would you consider more freedom to customize the serializer, i.e. what gets passed as serializerOptions here. Maybe just another object you can pass that gets spread into serializerOptions?

My use case: I would like to use the transform function (see https://github.com/SeyZ/jsonapi-serializer#available-serialization-option-opts-argument) to convert a comma-separated list of values in a frontmatter attribute into a proper array in the JSON-API payload.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/markdown-to-jsonapi.js at lines 38-45 and compare the current serializerOptions construction with the jsonapi-serializer options documentation. Confirm how a caller could provide the transform option, then verify that custom options reach serialization without changing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.