0.0.2 • Published 5 years ago

gist-author v0.0.2

Weekly downloads
6
License
-
Repository
-
Last release
5 years ago

Gist Author

Gist Author provides user experiences over Gist-backed content. This system is aimed at the strange subset up authors who want to publish content (sometimes on an ad-hoc bases) AND who are already invested in Gist-based tools and integrations.

Authors can create content in any markdown-friendly editor by posting a gist of markdown. The content is then published via a CLI tool that can output a static app for viewing the content. Larger contexts can be created around collections of Gists by publishing additional "metadata Gists" that declare which "content Gists" should be included in the contexts' "collection". For example a group of Gists could be organized into a blog, CMS, book, course, or other format by publishing a YAML document as a Gist.

Install

yarn global add gist-author

Usage

Sign in

The first time you use Gist Author you must sign in. The CLI doesn't yet provide a way to sign in. In the meantime visit your Github settings to generate an personal access token. The only scope it requires is gist.

Create a token in your Github Developer account settings.

Then copy and paste your token to your Gist Author config file

mkdir ~/.config
chmod 700 ~/.config
echo GITHUB_ACCESS_TOKEN > ~/.config/gist-author

Publishing a single post

Publishing a single post is as simple as having a compatible markdown Gist and then invoking the CLI's publish command with the Gist ID.

  1. Create a markdown Gist. To be compatible the Gist must be in markdown format, starts with a top-level (H1) header, and must not be a multi-file Gist.

  2. Publish the Gist as a post by ID

    gist-author publish <gist-id>

Publishing a blog

Publishing a blog is accomplished by publishing compatible markdown Gists, publishing a manifest Gist in YAML format, and then invoking the CLI's publish command with the Gist ID.

  1. Create Gists for each post similarly to the instructions for publishing a single post.

  2. Publish a YAML gist that includes a role and list of Gist post ids

    role: blog
    title: Mikes blog!
    subtitle: Full of great content!
    ids:
    - "05c66b94af10c7d63b912e21bad3195c"
    - "7ae04c3572b338d0ac6227e9dab84837"
  3. Publish the YAML Gist as a blog by ID

    gist-author publish <gist-id>

Setting a theme

A theme can be set when exporting site, e.g.

See styled-jsx-themes for a full list of themes.

gist-author publish <gist-id> --theme earthly

Or a theme can be set when configuring context, e.g.

role: blog
title: Mikes blog!
theme: earthly
subtitle: Full of great content!
ids:
- "05c66b94af10c7d63b912e21bad3195c"
- "7ae04c3572b338d0ac6227e9dab84837"