npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ghost-gcp-storage-adapter

v1.1.0

Published

Ghost adapter to store images into Google Cloud Storage

Downloads

3

Readme

ghost-gcp-storage-adapter

Ghost adapter to store images into Google Cloud Storage.

npm ghost

:arrow_down: Installation

Google Cloud Storage Configuration

  1. Create a project from Google Cloud Console
  2. Be sure that Google Cloud Storage API is enable in APIs & Services > Library
  3. Create a new Service Account in IAM & Admin > Service Accounts
  4. Create new credentials for your service account in IAM & Admin > Service Accounts > <Your Service Account> > Actions > Manage Keys > Add Key
  5. Download your credentials as a JSON file and renamed it to credentials.json
  6. Create a bucket to store your files (use Fine-grained access control)

Server Configuration for production

  1. Go to your Ghost instalation folder (the folder where you have the files config.production.json or config.development.json):
cd /your/ghost/instalation/folder
  1. Create the adapters/storage folder inside the content folder:
mkdir -p content/adapters/storage
  1. Install this package via NPM:
npm i ghost-gcp-storage-adapter
  1. Copy the installed package into content/adapters/storage:
cp -r node_modules/ghost-gcp-storage-adapter content/adapters/storage/ghost-gcp-storage-adapter
  1. Copy your credentials.json file into content/adapters/storage/ghost-gcp-storage-adapter

  2. Add the next configuration to your config.production.json file:

"storage": {
  "active": "ghost-gcp-storage-adapter",
  "ghost-gcp-storage-adapter": {
    "projectId": "<your_google_cloud_project_id>",
    "keyFilename": "<your_ghost_instalation_folder>/content/adapters/storage/ghost-gcp-storage-adapter/credentials.json",
    "bucketName": "<your_bucket_name>"
  }
}
  1. Restart Ghost

Configuration for development

If you want to contribute or test this adapter, you can use it locally by following the next instructions:

  1. Follow the same steps to configure Google Cloud Storage
  2. Fork this repo
  3. Clone your fork in your computer
  4. Install Ghost locally (Instructions)
  5. In the folder where you installed Ghost, install the adapter locally
cd ghost_folder/
npm install /path/to/your/forked/repo
  1. Create the adapters/storage folder inside the content folder:
mkdir -p content/adapters/storage
  1. Copy the installed package into content/adapters/storage:
cp -r node_modules/ghost-gcp-storage-adapter content/adapters/storage/ghost-gcp-storage-adapter
  1. Copy your credentials.json file into content/adapters/storage/ghost-gcp-storage-adapter
  2. Stop Ghost and running it in development mode by using:
NODE_ENV=development ghost run

With this you'be able to see the logs in real time and test and debug this package.

:page_with_curl: License

MIT