Sphido logo


Core contains most important getPage() and getPages() functions.

Basic page object looks like bellow:

  "file":"path to the file",
  "dir": " directory to the file",
  "base" : "file basename without extension",
  "content": "content of file"

Pages are merged inside getPage() function together with extenders. Extender can be object or function.


yarn add @sphido/core


import globby from 'globby';
import {getPages} from '@sphido/core';

(async () => {
  const pages = await getPages(
    await globby('content/**/*.{md,html}')

You can also process single page like follow:

import {getPage} from '@sphido/core';

(async () => {
  const page = await getPage('example.md');

Source codes