sacred

command module
v0.0.0-...-42c701e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Sacred

Keep Github Wiki's, READMEs, or any other markdown files in sync with Confluence pages.

Sacred is configured with a manifest file that allows you to upload multiple confluence documents composed of many markdown files.

Currently a confluence document needs to exist (contentId) for Sacred to update it. Sacred will not (currently) create new documents.

Installation

go get -u github.com/coryodaniel/sacred

Usage

By default sacred looks for .sacred.yaml in the current directory.

sacred upload

# Specify an alternate config path

sacred upload -c path/to/my/config.yaml
Config Examples
Single Confluence document from a single markdown file
auth:
  token: CONFLUENCE_API_TOKEN
  domain: your-domain.atlassian.net
docs:
- name: My first document # This will update the Confluence document name
  spaceId: CONFLUENCE_SPACE_ID
  contentId: CONFLUENCE_CONTENT_ID
  files:
  - ./README.md
Multiple Confluence Documents with multiple markdown files
auth:
  token: CONFLUENCE_API_TOKEN
  domain: your-domain.atlassian.net
docs:

- name: My first document
  # notice: will set a notice at the top of the generated HTML
  notice: <strong>DO NOT EDIT! This file is autogenerated from https://my-repo</strong>
  spaceId: CONFLUENCE_SPACE_ID
  contentId: CONFLUENCE_CONTENT_ID_1
  files:
  - ./README.md
  - ./CONTRIBUTORS.md

- name: Another document
  spaceId: CONFLUENCE_SPACE_ID
  contentId: CONFLUENCE_CONTENT_ID_2
  files:
  - ./README.md
  - ./wiki/intro-to-widgets.md
  - ./wiki/advanced-widgetry.md
  # globs will be appened in alphabetical order and will not include files listed above
  - ./wiki/*.md

Additionally the following environment variables may be set:

  • SACRED_TOKEN - Override auth.token
  • SACRED_DOMAIN - Override auth.domain

Creating a Confluence API Token

Create an API token from your Atlassian account:

  1. Log in to https://id.atlassian.com.
  2. Click API tokens
  3. Then Create API token

This token can either be set in your .sacred.yaml file or in the SACRED_TOKEN environment variable.

Confluence Content and Space Identifiers

The content and space ID can be found in the content URL:

https://YOUR_DOMAIN.atlassian.net/wiki/spaces/SPACE_ID/pages/CONTENT_ID/Markdown+Test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL