Skip to content

reverentgeek/ghost-to-eleventy-exporter

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ghost Exporter for Eleventy

A utility for downloading content and images from a site running Ghost. Currently designed for the Ghost API version 3. Feel free to download the source code and tweak it to fit your needs.

Requirements

Configuration

  1. Clone or download this repository.
  2. Install dependencies using npm
    npm install
  3. Create a .env file or copy the .env.sample to .env.
    GHOST_API_URL=https://reverentgeek.com
    GHOST_CONTENT_API_KEY=
    SITE_URL=https://reverentgeek.com
  4. Change the GHOST_API_URL and SITE_URL values to match your Ghost site and your destination site.
  5. Login to your Ghost admin panel.
  6. Under Settings, click Integrations.
  7. Click Add custom integration.
  8. Enter name, such as Eleventy Export and click Create.
  9. Copy the Content API Key and update the GHOST_CONTENT_API_KEY value in the .env file.

Usage

Run the utility from the command line using Node.js. Available command-line options:

Usage: node . [options]

Options:
  -o, --out <folder>        directory to write exported content
                            (defaults to 'site' in the current folder)
  --ghost-url <apiUrl>      Ghost site url
  --ghost-api-key <apiKey>  Ghost API key
  --site-url <siteUrl>      Destination site url, if different than Ghost site url
  --skip-images             skip downloading images
  --skip-pages              skip exporting pages
  --skip-posts              skip exporting posts
  --slugs [slugs]           comma-separated list of content slug to convert explicitly
                            from html to markdown
  --filter [slugs]          comma-separated list of content slugs to skip conversion
  --debug                   Write unprocessed original content to out folder as JSON
  -h, --help                display help for command

If you run the utility without any command line arguments...

node .

...you should expect a new folder named site with all the content and images downloaded.

About

Export content and images from Ghost to use with Eleventy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published