Neatly Packaged Manuals

    TypeScript icon, indicating that this package has built-in type declarations

    1.3.3 • Public • Published

    Blog Fetch to Markdown

    Contributors Forks Stargazers Issues Language grade: JavaScript Maintenance David Dependencies Status License: MIT FOSSA Status LinkedIn Twitter: HoukasaurusRex

    Fetch markdown content from api and write to files with frontmatter and component appending support.

    Check it out »

    Report BugRequest Feature

    Table of Contents

    About The Project

    Fetch to Markdown solves a common problem when working with a headless CMS by simply fetching your content at a provided api endpoint and writing to markdown files. It supports writing custom frontmatter and appending component tags to each file.

    ☕️ Usage

    Usage is simple and assumes a REST api endpoint.

    First install the module

    npm install fetch-to-markdown
    yarn add fetch-to-markdown

    Download from a single resource

    const { fetchToMarkdown } = require('fetch-to-markdown')
    fetchToMarkdown('', 'articles' {
      contentDir: 'public' // the directory to write files relative to project root (defaults to 'content')

    Or from multiple resources at once

    const { fetchToMarkdown } = require('fetch-to-markdown')
    const contentAPI = ''
      fetchToMarkdown(contentAPI, 'articles', {
        components: articleComponents,
      fetchToMarkdown(contentAPI, 'projects', {
        readme: `Write a custom file in the /projects directory`,
      fetchToMarkdown(contentAPI, 'companies'),
      fetchToMarkdown(contentAPI, 'links'),
      fetchToMarkdown(contentAPI, 'about'),
      fetchToMarkdown(contentAPI, 'landing', {
        components: landingComponents,
        landing: true // writes file

    🤝 Contributing

    Want to make a change? Any contributions you make are greatly appreciated.

    Check out the issues page

    🗺 Roadmap

    See the open issues for a list of proposed features (and known issues)

    📦 Dependencies

    FOSSA Status


    npm i fetch-to-markdown

    DownloadsWeekly Downloads






    Unpacked Size

    47.4 kB

    Total Files


    Last publish


    • pterobyte