Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
Changes from Ruby Slate v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Feb 24, 2017
1 parent e87c35b commit ec3f3c1
Show file tree
Hide file tree
Showing 10 changed files with 2,348 additions and 868 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.txt
compare.js
doit.sh
source/layouts/layout.erb

# Logs
logs
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Beautiful static documentation for your API.
Shins is a port of [Slate](https://github.com/lord/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](http://mermade.github.io/shins/screenshot.jpg)

### Usage
Expand Down Expand Up @@ -45,4 +47,5 @@ The `err` parameter is the result of the `ejs` rendering step.

* Windows is definitely supported
* Syntax highlighting in 166 languages and 68 themes (you can specify the highlighter theme to use by setting `highlighter_theme` in your slate markdown header)
* Multiple language tabs per language are supported
* For converting OpenApi / Swagger specs to Shins or Slate, see [widdershins](http://github.com/mermade/widdershins)
1,535 changes: 1,080 additions & 455 deletions index.html

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ var hlpath = require.resolve('highlightjs/highlight.pack.js').replace('highlight

var md = require('markdown-it')({linkify: true, html: true,
highlight: function (str, lang) {
if (lang && hljs.getLanguage(lang)) {
var slang = lang.split('--')[0]; // allows multiple language tabs for the same language
if (slang && hljs.getLanguage(slang)) {
try {
return '<pre class="highlight '+lang+'"><code>' +
hljs.highlight(lang, str, true).value +
return '<pre class="highlight tab-'+lang+'"><code>' +
hljs.highlight(slang, str, true).value +
'</code></pre>';
} catch (__) {}
}
Expand Down
1 change: 1 addition & 0 deletions pub/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ html, body {
display: block; }

.content {
-webkit-transform: translateZ(0);
position: relative;
z-index: 30; }
.content:after {
Expand Down
2 changes: 1 addition & 1 deletion source/includes/_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Error Code | Meaning
418 | I'm a teapot
429 | Too Many Requests -- You're requesting too many kittens! Slow down!
500 | Internal Server Error -- We had a problem with our server. Try again later.
503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later.
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
Loading

0 comments on commit ec3f3c1

Please sign in to comment.