All Projects → Mermade → Shins

Mermade / Shins

Licence: apache-2.0
Shins development continues at

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Shins

Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+242.4%)
Mutual labels:  api, swagger, openapi, documentation, slate
Hexo Theme Doc
A documentation theme for the Hexo blog framework
Stars: ✭ 222 (-11.2%)
Mutual labels:  api, swagger, documentation, static-site-generator
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (-10.4%)
Mutual labels:  api, swagger, openapi, documentation
L5 Swagger
OpenApi or Swagger integration to Laravel
Stars: ✭ 1,781 (+612.4%)
Mutual labels:  api, swagger, openapi, documentation
Swagger Combine
Combines multiple Swagger schemas into one dereferenced schema.
Stars: ✭ 102 (-59.2%)
Mutual labels:  api, swagger, openapi, documentation
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (+87.6%)
Mutual labels:  api, swagger, openapi, documentation
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+106.4%)
Mutual labels:  api, swagger, openapi, documentation
Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (+210.4%)
Mutual labels:  api, swagger, openapi, documentation
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+232.4%)
Mutual labels:  api, swagger, openapi, documentation
Api2html
A CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via Shins/Widdershins.
Stars: ✭ 103 (-58.8%)
Mutual labels:  openapi, static-site-generator, slate
Wizard
Wizard是一款开源的文档管理工具,支持Markdown/Swagger/Table类型的文档。
Stars: ✭ 1,733 (+593.2%)
Mutual labels:  api, swagger, openapi
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-47.6%)
Mutual labels:  api, swagger, openapi
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-16.8%)
Mutual labels:  api, swagger, openapi
Cats
Generate tests at runtime based on OpenApi specs
Stars: ✭ 86 (-65.6%)
Mutual labels:  api, swagger, openapi
Awesome Documentation Tools
🔥 📚 All the tools, processes and resources you need to create an awesome API & Project documentation
Stars: ✭ 138 (-44.8%)
Mutual labels:  api, swagger, documentation
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+1030%)
Mutual labels:  api, swagger, openapi
Flama
🔥 Fire up your API with this flamethrower
Stars: ✭ 161 (-35.6%)
Mutual labels:  api, swagger, openapi
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+1279.2%)
Mutual labels:  api, swagger, openapi
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (-28.8%)
Mutual labels:  api, swagger, openapi
Docfx
Tools for building and publishing API documentation for .NET projects
Stars: ✭ 2,873 (+1049.2%)
Mutual labels:  api, documentation, static-site-generator

shins

Shins Is Not Slate

Note: development on Shins has stopped. Please see ReSlate for the replacement.

Beautiful static documentation for your API.

logo

Shins is a port of Slate to Javascript / Nodejs, and would not be possible without all of that hard work.

Version numbers of Shins aim to track the version of Slate they are compatible with.

screenshot

Usage

  • Fork the repository
  • Clone the fork
  • Edit source/index.html.md
  • npm install
  • node shins.js (alias npm run build) or
    • node shins.js --minify or
    • node shins.js --customcss or
    • node shins.js --inline or
    • node shins.js --unsafe or
    • node shins.js --no-links
  • To add custom logo add --logo option with path to your logo image.
  • To use a different layout template (default source/layouts/layout.ejs use the --layout option.
  • To make the logo image link to a webpage, add --logo-url option with URL to link to.
  • To specify a different output filename from the default ./index.html, use the --output or -o option.
  • To allow css-style attributes in markdown, specify the --attr option.
  • You can specify another location for the source and pub directories using the --root option.
  • To check locally: node arapaho or npm run serve and browse to localhost:4567 - changes to your source .html.md files and the source/includes directory will automatically be picked up and re-rendered. If you use --launch or -l or npm run start your default browser will be opened automatically. You can also pass shins options on the arapaho command-line.
  • Add, commit and push
  • Then (in your fork) press this button

Deploy

Or, to deploy to GitHub Pages:

  • Change the setting on your fork so Github Pages are served from the root directory
  • Browse to https://{yourname}.github.io/{repository-name}

To deploy to your own web-server:

If you use the option --minify to shins, the only things you need to take to your web host is the generated index.html and the contents of the pub directory, which should be kept relative to it, so the structure is always:

{whatever}/index.html
{whatever}/pub/css/
{whatever}/pub/js/

If you use the --inline option to shins, then everything is bundled into the index.html file and no pub directory is required. Fonts are by default loaded from this github repository, but this can be overridden with the --fonturl option.

Docker

A Dockerfile is included. To build:

  • docker build . -t shins:latest

to run:

  • docker run -p 4567:4567 -v $(pwd)/source:/srv/shins/source shins:latest

Multiple Shins pages / portal

There is a simple example of using an index markdown file as an entry point to a collection of Shins pages here.

API

const shins = require('shins');
let options = {};
options.cli = false; // if true, missing files will trigger an exit(1)
options.minify = false;
options.customCss = false;
options.inline = false;
options.unsafe = false; // setting to true turns off markdown sanitisation
options['no-links'] = false; // if true, do not automatically convert links in text to anchor tags
//options.source = filename; // used to resolve relative paths for included files
shins.render(markdownString, options, function(err, html) {
  // ...
});

or, with Promises:

const shins = require('shins');
let options = {};
options.cli = false; // if true, missing files will trigger an exit(1)
options.minify = false;
options.customCss = false;
options.inline = false;
options.unsafe = false; // setting to true turns off markdown sanitisation
options['no-links'] = false; // if true, do not automatically convert links in text to anchor tags
//options.source = filename; // used to resolve relative paths for included files
options.logo = './my-custom-logo.png';
options['logo-url'] = 'https://www.example.com';
shins.render(markdownString, options)
.then(html => {
  // ...
});

The err parameter is the result of the ejs rendering step.

Setting customCss to true will include the pub/css/screen_overrides.css,pub/css/print_overrides.css and pub/css/theme_override.css files, in which you can override any of the default Slate theme, to save you from having to alter the main css files directly. This should make syncing up with future Shins / Slate releases easier.

Setting inline to true will inline all page resources (except resources referenced via CSS, such as fonts) to output html. This way HTML can be used stand-alone, without needing any other resources. It will also set minify to true.

Set logo path to add your custom logo as absolute path or path relative to process working directory. If inline option is on image will be inlined, else it will be copied to source/images directory and included via src image attribute.

Set logo-url if you want the logo image to link to a webpage.

Updating from Slate

  • Note: changes to Slate CSS, Javascript etc may break assumptions made in Shins. Use at your own risk.
  • The script updateFromSlate assumes you have Ruby Slate checked-out by the side of shins (i.e. in a sibling directory) and will copy .scss files, fonts, Javascript files etc.
  • The buildstyle.js program can be used to process the .scss files to their .css equivalents. It takes one optional parameter, the outputStyle used by node-sass. This can be either nested, expanded, compact or compressed. Default is nested. It also respects the --root option.

Notes

  • Windows is definitely supported
  • Syntax highlighting in 189 languages and 91 themes (you can specify the highlighter theme to use by setting highlight_theme in your slate markdown header)
  • Multiple language tabs per language are supported
  • Static TOC as per Slate v2.0
  • GitHub emoji shortcuts are supported
  • For converting OpenAPI / Swagger or AsyncAPI definitions to Shins or Slate, see widdershins
  • arapaho has a --preserve or -p option which will not overwrite your .html output file, but still re-render when necessary
  • Shins ships with an alternate theme by TradeGecko which is also under the Apache 2.0 license, pub/css/tradegecko.min.css can be included with the --css option
  • Shins additionally supports AsciiDoc include::filename[] syntax as well as !INCLUDE filename from markdown-pp - this is not supported by Slate. See some more information about including files.

Shins in the wild

Please feel free to add a link to your API documentation here

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].