New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@667/ghost-storage-github

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@667/ghost-storage-github

GitHub storage adapter for Ghost

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
0
Weekly downloads
 
Created
Source

ghost-storage-github

GitHub storage adapter for Ghost. Recommended as a completely free storage solution for blogs being hosted on platforms with ephemeral filesystems, like Heroku.

Installation

cd /path/to/your/ghost/installation
npm install ghost-storage-github
mkdir -p content/adapters/storage
cp -r node_modules/ghost-storage-github content/adapters/storage/ghost-storage-github

Usage

Add the following to your configuration file and modify it accordingly.

"storage": {
    "active": "ghost-storage-github",
    "ghost-storage-github": {
        "token": "<your token here>",
        "owner": "<your username here>",
        "repo": "ghost-assets",
        "branch": "master",
        "destination": "my/subdirectory",
        "baseUrl": "https://cdn.example.com",
        "useRelativeUrls": false
    }
}

Here's a comprehensive list of configurations:

NameRequired?DescriptionEnvironment variable (prefixed with GHOST_GITHUB_)
baseUrlnoBase URL of newly saved images. Uses raw.githubusercontent.com by defaultBASE_URL
branchnoBranch to push assets to. Defaults to masterBRANCH
destinationnoDirectory to push assets to. Defaults to /DESTINATION
owneryesUsername of the user/organization the repo is underOWNER
repoyesName of the repoREPO
tokenyesYour personal access tokenTOKEN
useRelativeUrlsnoWhether or not to return relative URLs (i.e. under /content/images) instead of absolute URLs. Might be of use to people who generate and serve a static version of their Ghost blog.USE_RELATIVE_URLS

Questions

How do I get a personal access token?

  1. Create a new personal token here.
  2. Select 'repo' (which will select everything under repo), as ghost-storage-github will need access to your repository.
  3. Copy the token that shows up upon successful creation, and paste that into the token field of ghost-storage-github's configuration.

I'm getting a "Bad credentials" error. What should I do?

Your token or password might be incorrect. You should double-check your configuration.

I'm getting a "Not found" error. What should I do?

Make sure the repository you specified exists. Also, check to make sure the branch (if specified) exists in the repo.

License

MIT License

FAQs

Package last updated on 20 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc