Use @sphido/markdown in the examples - #1
Merged
Merged
Conversation
basic, extenders, json and rss rendered markdown by calling marked inside the loop; they now pass markdown() to getPages() as the last extender and read the HTML from page.content. The extenders example drops its getContent() object extender — rendering is what the package does now, and the example still demonstrates callback extenders, an extender package and object extenders side by side. sitemap listed marked without ever importing it, so the dependency goes.
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to sphido/sphido#53, which adds
@sphido/markdown.Changes
basicmarked(page.content)in the loopgetPages(…, frontmatter, markdown())extendersgetContent()object extender calling markedmarkdown()extender, template readsthis.contentjsonmarked(page.content)in the loopmarkdown()ingetPages()rssmarked(await readFile(page.path))markdown()loads and renderssitemapdependencies, never importedThe
extendersexample still shows all three kinds side by side: callback extenders (metadata,author, inline), an extender package (markdown()) and object extenders (getFooter,getTitle,getHtml,save).Verified
All four rebuilt locally against the working copy of the monorepo package — HTML, JSON and
rss.xmloutput checked by hand.Blocked on
CI installs from npm without a lockfile, so it stays red until
@sphido/markdown@1.0.0is published. Merge and release sphido/sphido#53 first.Unrelated finding
basiccrashes with the unreleased@sphido/frontmatterfrom monorepo main:date?.toLocaleDateString is not a function. The js-yaml 4 → 5 bump changed the default schema, so a YAMLdate: 2018-10-01now comes back as a string instead of aDate. Published 3.1.0 (js-yaml ^4.1.1) is fine, so CI is green today — but the next frontmatter release will break this example and any user doing date arithmetic. js-yaml 5 still exportstimestampTag/YAML11_SCHEMA, so it is fixable in the extender. Reported here for the record; needs its own issue in sphido/sphido.