Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .documentation/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": [ "istanbul" ]
}
}
}
9 changes: 9 additions & 0 deletions .documentation/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
5 changes: 5 additions & 0 deletions .documentation/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
27 changes: 27 additions & 0 deletions .documentation/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// http://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
17 changes: 17 additions & 0 deletions .documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.DS_Store
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage
/test/e2e/reports
selenium-debug.log

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
!/build/
!/build/*
8 changes: 8 additions & 0 deletions .documentation/.postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
// to edit target browsers: use "browserlist" field in package.json
"autoprefixer": {}
}
}
42 changes: 42 additions & 0 deletions .documentation/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"plugins": [
"stylelint-scss",
"stylelint-selector-bem-pattern"
],
"processors": [
"stylelint-processor-html"
],
"extends": [
"stylelint-config-standard",
"stylelint-config-recess-order"
],
"rules": {
"no-empty-source": null,
"at-rule-empty-line-before": [
"always", {
"ignoreAtRules": [ "else" ]
}
],
"block-opening-brace-space-before": "always",
"block-closing-brace-newline-after": [
"always", {
"ignoreAtRules": [ "if", "else" ]
}
],
"at-rule-name-space-after": "always",
"rule-empty-line-before": "always",
"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
"scss/at-else-closing-brace-space-after": "always-intermediate",
"scss/at-else-empty-line-before": "never",
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
"scss/at-if-closing-brace-space-after": "always-intermediate",
"plugin/selector-bem-pattern": {
"componentName": "[A-Z]+",
"componentSelectors": {
"initial": "^\\.{componentName}(?:-[a-z]+)?$",
"combined": "^\\.combined-{componentName}-[a-z]+$"
},
"utilitySelectors": "^\\.util-[a-z]+$"
}
}
}
20 changes: 20 additions & 0 deletions .documentation/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js
node_js:
- "8.11.4"
cache:
yarn: true
directories:
- node_modules
script:
- npm run build
env:
- GH_PAGES=true
deploy:
provider: pages
skip_cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
local_dir: dist
github-url: github.ibm.com
on:
branch: master
12 changes: 12 additions & 0 deletions .documentation/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>404</h1>
</body>
</html>
115 changes: 115 additions & 0 deletions .documentation/MARKDOWN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

# Markdown for WDP documentation cheatsheet

Here's how to format Markdown in your WDP topics.

**Headings:** Use #s followed by a blank space for notebook titles and section headings:

`#` title<br>
`##` major headings<br>
`###` subheadings<br>
`####` 4th level subheadings

**Emphasis:** Use this code: Bold: `__string__` or `**string**` Italic: `_string_` or `*string*`

**Attributes:**
Commonly used attributes:
```
cloud
beta blue
codeblock python r scala
```
In a ditamap, include this code in the topicref: `audience="attribute1 attribute2 attribute3"`. See any ditamap for an example.

Within a topic, you have to tag each element separately. Use this syntax on a line by itself right after the text you want to tag:
`{: .attribute1 attribute2}`
For bullets, put after the list to tag them all, or put in front of a single bullet to tag only that line.

**Monospace font:** Surround text with a back quotes (to the left of the 1 key). Don't use for code blocks.
Use monospace for file path and file names and for text users enter or message text users see.

**Code blocks:** Type 3 back quotes on a line. On the next line, start the code. After the code, put 3 back quotes on a line. To do it right, also include codeblock and language attributes: see MarkdownResource.md.

**Line breaks:** Sometimes markdown doesn’t make line breaks when you want them.
Use this code for a manual line break: `<br>`

**Indenting:** Use a greater than sign (`> `) and then a space, then type the text.
Everything is indented until the next carriage return.

**Bullets:** Use the dash sign (`- `) with two spaces after it or a space, a dash, and a space (` - `),
to create a circular bullet. To create a sub bullet, use a tab followed a dash and two spaces.
You can also use an asterisk instead of a dash, and it works the same.

**Numbered lists:** Start with `1.` followed by a space.
Start each line with some number and a period, then a space. Indent 3 spaces to get subnumbering. You can include bullets and other elements in a step, but don't include blank lines in between or the numbering will discontinue.

**Graphics:** Use this syntax:
``` markdown
![Alt text](../images/stormtroopocat.jpg "The Stormtroopocat")
```

**Tables:** Use this syntax:
``` markdown
| Heading | Heading |
| ----| ----|
| text | text |
| text | text |
{: caption="Table 1. Table title" caption-side="top"}
```

**Internal links:** To link to another file in our doc set

```markdown
[Link Text](../relative/linkto/filename.html)
```
**Sub-section links:**

``` markdown
[Section Title](#section-title)
```
For the text in the parentheses, replace spaces and special characters with a hyphen. Make sure to test all the links!

Alternatively, you can add an ID for a section right below the section title. Use this code: `{: #section_ID}`
Make sure that the section_ID is unique within the notebook.

**Link to sub-section in another internal file:**

```markdown
[Link text you want](relative/linkto/filename.html#subheading-anchor)
```

**External links:** Use this code and test all links!
``` markdown
[Link text](https://url/to/topic.html){: new_window}
```
or
```html
<a href="external-url" target="_blank" rel="noopener noreferrer">link text</a>
```

**Videos:** Use this syntax:

```html
<figure class="fignone" id="video01"><figcaption>Figure 1. <span class="ph"><a href="VIDEO_URLrel=0" rel="external" target="_blank" title="If you cannot access the video that is embedded in this page, you can access the video from the YouTube website. (Opens in a new tab or window)"> <img src="images/video.png" alt="Video icon"></a>VIDEO_CAPTION</span></figcaption>

<object height="315" data="VIDOE_URLrel=0" width="560">
<span>ADD AN EXPLANATION OF WHAT THE VIDEO SHOWS SOMEONE HOW TO DO.</span>
<param name="movie" value="VIDEO_URLrel=0">
<param name="allowFullScreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="scale" value="noScale">
</object>
</figure>
```

For accessibility, videos need closed captioning.

**Conrefs:** Use the conrefs in the `dsxconrefs.yml` file. Use this syntax, replacing `conref` with the conref name:
``` markdown
{{site.data.keyword.conref}}
```

**Comments:** Use this syntax:
``` markdown
<!-- text to hide in all builds -->
```
67 changes: 67 additions & 0 deletions .documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

## GIT Playbook

GIT Playbook is a documentation framework that allows you to create Documentation for your project using Markdown and GH-Pages rapidly. This is the repository for Medium article <a href="https://medium.com/@thomas.reinecke/create-compelling-documentation-with-github-pages-16e4149efe9e" target="_blank">Create compelling Documentation with Github Pages</a> by <a href="https://github.com/thomasreinecke" target="_blank">Thomas Reinecke</a> and <a href="https://github.com/kaiwedekind" target="_blank">Kai Wedekind</a>.

![image](https://user-images.githubusercontent.com/35994116/45641683-75532e80-bab6-11e8-81a6-f31ad27f1bf4.png)

* <a href="https://thomasreinecke.github.io/git-playbook/#/playbook" target="_blank">Demo environment (on GH pages)</a>
* <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">Markdown Cheatsheet</a>

## Main Features
* Runs your Markdown-based documentation on a webapp
* Mobile ready, responsive design
* supports any level of document hierarchy
* supports title, description & icon for every Folder & Document
* Live Search/Filtering capability keyword and topic-based (no server infrastructure necessary for it)
* All-In-One WebFrontend, only needs a webcontainer to run, optimized for deployment on GH Pages
* Left-Sided Tree Navigator
* Support for Multiple Playbooks in one app
* Breadcrumb Support to navigate through any level of the document hierarchy easily
* Topic Support to group documents together

## How to use it
* get started by reading the article <a href="https://medium.com/@thomas.reinecke/create-compelling-documentation-with-github-pages-16e4149efe9e" target="_blank">Create compelling Documentation with Github Pages</a>
* clone repository and follow the "Build Setup" instructions below
* edit "src/pageConfig.json" and change the document structure as you desire
* write your documents in Markdown and put them into the "static" folder
* create yourself a GIT repository and import your playbook trunk
* deploy it with `npm run gh-pages`
* in your GH repository > Settings > scroll down to "Github Pages", make sure it points to your "gh-pages" branch
* find the link to your GH page deployment on that screen aswell
![image](https://user-images.githubusercontent.com/35994116/45642352-36be7380-bab8-11e8-95d5-a014c0422f63.png)
* for feedback, enhancement requests or defect reports use "Issues" here on this repo

Enjoy!

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification, also build the search index
npm run build

# build the search index only
npm run build-search

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

# deploy playbook to GH pages (includes build and deploy to GH pages)
npm run gh-pages
```

37 changes: 37 additions & 0 deletions .documentation/build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict'

require('./check-versions')()

process.env.NODE_ENV = 'production'

const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')

const spinner = ora('building for production...')
spinner.start()

rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n')

console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
Loading