No description
Find a file
saberzero1 18cf785f52
fix: add createRequire banner for CJS compat in ESM bundles
Bundled CJS dependencies (e.g. reading-time) use require() for Node
builtins like 'stream' and 'util'. In ESM output, the esbuild-generated
__require shim throws 'Dynamic require of X is not supported' because
there is no global require in ESM context.

Add platform: 'node' and a banner that injects createRequire from the
'module' builtin, providing a working require() function for the CJS
compatibility layer.
2026-03-17 20:34:33 +01:00
.github/workflows ci: add dist externals verification step 2026-03-17 19:41:47 +01:00
dist fix: add createRequire banner for CJS compat in ESM bundles 2026-03-17 20:34:33 +01:00
src chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
types chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.eslintrc.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.gitignore chore: commit dist/ and remove prepare script 2026-03-14 21:57:39 +01:00
.prettierignore chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.prettierrc Initial commit 2026-02-13 16:53:51 +01:00
CHANGELOG.md Initial commit 2026-02-13 16:53:51 +01:00
LICENSE Initial commit 2026-02-13 16:53:51 +01:00
package-lock.json fix: update types/utils lockfile to commits with dist/ 2026-03-14 22:42:43 +01:00
package.json fix: bundle non-shared deps into dist to prevent runtime resolution failures 2026-03-17 19:31:51 +01:00
README.md docs: update README for v5 unified config system 2026-02-25 16:07:11 +01:00
tsconfig.json Initial commit 2026-02-13 16:53:51 +01:00
tsup.config.ts fix: add createRequire banner for CJS compat in ESM bundles 2026-03-17 20:34:33 +01:00
vitest.config.ts fix: add passWithNoTests to vitest config 2026-03-09 03:21:30 +01:00

@quartz-community/content-meta

Displays content metadata such as creation date and reading time.

Installation

npx quartz plugin add github:quartz-community/content-meta

Usage

plugins:
  - source: github:quartz-community/content-meta
    enabled: true
    layout:
      position: beforeBody
      priority: 20

For advanced use cases, you can override in TypeScript:

import * as ExternalPlugin from "./.quartz/plugins";

ExternalPlugin.ContentMeta({
  showReadingTime: true,
  showComma: true,
});

Configuration

Option Type Default Description
showReadingTime boolean true Whether to display the estimated reading time.
showComma boolean true Whether to display a comma between metadata items.

Documentation

See the Quartz documentation for more information.

License

MIT