All Projects → posener → Goreadme

posener / Goreadme

Licence: mit
Generate readme file from Go doc. Now available with Github actions!

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Goreadme

Format Readme
Формат файла README
Stars: ✭ 270 (+138.94%)
Mutual labels:  docs, readme, markdown
Markdown Magic
💫 Automatically format markdown files, sync external docs/src code & make better docs
Stars: ✭ 551 (+387.61%)
Mutual labels:  docs, readme, markdown
Vuesence Book
Minimalistic Vue.js based documentation system component
Stars: ✭ 48 (-57.52%)
Mutual labels:  docs, doc, markdown
Docsify
🃏 A magical documentation site generator.
Stars: ✭ 19,310 (+16988.5%)
Mutual labels:  docs, doc, markdown
Imgbot
An Azure Function solution to crawl through all of your image files in GitHub and losslessly compress them. This will make the file size go down, but leave the dimensions and quality untouched. Once it's done, ImgBot will open a pull request for you to review and merge. [email protected]
Stars: ✭ 732 (+547.79%)
Mutual labels:  github-app, code-quality
Readme
README文件语法解读,即Github Flavored Markdown语法介绍
Stars: ✭ 5,812 (+5043.36%)
Mutual labels:  readme, markdown
Feedmereadmes
Free README editing+feedback to make your open-source projects grow. See the README maturity model to help you keep going.
Stars: ✭ 1,064 (+841.59%)
Mutual labels:  docs, readme
Docsify Tabs
A docsify.js plugin for rendering tabbed content from markdown
Stars: ✭ 65 (-42.48%)
Mutual labels:  docs, markdown
Pep8speaks
A GitHub app to automatically review Python code style over Pull Requests
Stars: ✭ 546 (+383.19%)
Mutual labels:  github-app, code-quality
Parse Comments
Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
Stars: ✭ 53 (-53.1%)
Mutual labels:  docs, markdown
Funbook Old
I have a dream, to be a novelist someday.
Stars: ✭ 65 (-42.48%)
Mutual labels:  docs, markdown
Kodexplorer
A web based file manager,web IDE / browser based code editor
Stars: ✭ 5,490 (+4758.41%)
Mutual labels:  doc, markdown
Bluedoc
An open-source document management tool for enterprise self host.
Stars: ✭ 579 (+412.39%)
Mutual labels:  docs, markdown
Foliant
Comprehensive markdown-based documentation toolkit
Stars: ✭ 74 (-34.51%)
Mutual labels:  docs, markdown
Markdown Toc
Generate a markdown TOC (table of contents) for a README or any markdown files, using remarkable. Used by assemble, verb, and lots of other projects on GitHub. API and CLI.
Stars: ✭ 1,185 (+948.67%)
Mutual labels:  readme, markdown
Jsdoc To Markdown
Generate markdown documentation from jsdoc-annotated javascript
Stars: ✭ 1,199 (+961.06%)
Mutual labels:  readme, markdown
Readme styles
Minimal README.rst and README.md template for Github projects.
Stars: ✭ 60 (-46.9%)
Mutual labels:  readme, markdown
Live Doc
💫 Convert markdown to live React demos
Stars: ✭ 97 (-14.16%)
Mutual labels:  docs, markdown
The Documentation Compendium
📢 Various README templates & tips on writing high-quality documentation that people want to read.
Stars: ✭ 4,306 (+3710.62%)
Mutual labels:  docs, readme
Verb
HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
Stars: ✭ 442 (+291.15%)
Mutual labels:  docs, markdown

goreadme

Build Status codecov GoDoc

Package goreadme generates readme markdown file from go doc.

The package can be used as a command line tool and as Github action, described below:

Github Action

Github actions can be configured to update the README file automatically every time it is needed. Below there is an example that on every time a new change is pushed to the master branch, the action is trigerred, generates a new README file, and if there is a change - commits and pushes it to the master branch. In pull requests that affect the README content, if the github-token is given, the action will post a comment on the pull request with chnages that will be made to the README file.

To use this with Github actions, add the following content to .github/workflows/goreadme.yml. See ./actions.yml for all available input options.

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
jobs:
    goreadme:
        runs-on: ubuntu-latest
        steps:
        - name: Check out repository
          uses: actions/checkout@v2
        - name: Update readme according to Go doc
          uses: posener/goreadme@v1
          with:
            badge-travisci: 'true'
            badge-codecov: 'true'
            badge-godoc: 'true'
            badge-goreadme: 'true'
            # Optional: Token allows goreadme to comment the PR with diff preview.
            github-token: '${{ secrets.GITHUB_TOKEN }}'

Use as a command line tool

$ GO111MODULE=on go get github.com/posener/goreadme/cmd/goreadme
$ goreadme -h

Why Should You Use It

Both Go doc and readme files are important. Go doc to be used by your user's library, and README file to welcome users to use your library. They share common content, which is usually duplicated from the doc to the readme or vice versa once the library is ready. The problem is that keeping documentation updated is important, and hard enough - keeping both updated is twice as hard.

Go Doc Instructions

The formatting of the README.md is done by the go doc parser. This makes the result README.md a bit more limited. Currently, goreadme supports the formatting as explained in godoc page, or here. Meaning:

  • A header is a single line that is separated from a paragraph above.

  • Code block is recognized by indentation as Go code.

func main() {
	...
}

Additionally, the syntax was extended to include some more markdown features while keeping the Go doc readable:

  • Bulleted and numbered lists are possible when each bullet item is followed by an empty line.

  • Diff blocks are automatically detected when each line in a code block starts with a ' ', '-' or '+':

-removed line starts with '-'
 remained line starts with ' '
+added line starts with '+'
  • A repository file can be linked when providing a path that start with [./](./): ./goreadme.go.

  • A link can have a link text by prefixing it with parenthesised text: goreadme page.

  • A link to repository file and can have a link text: goreadme main file.

  • An image can be added by prefixing a link to an image with (image/<image title>):

title of image

Sub Packages

  • cmd/goreadme: Goreadme command line tool and Github action

Readme created from Go doc with goreadme

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].