From 165f8108f70ebae3831c15fd5d1cfe16a2e2da82 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Tue, 2 Feb 2021 14:07:46 +0800 Subject: [PATCH] ADD api document on line --- app/docs/slate/.dockerignore | 2 + app/docs/slate/.editorconfig | 18 + app/docs/slate/.gitattributes | 1 + app/docs/slate/.github/ISSUE_TEMPLATE/bug.md | 22 + .../slate/.github/ISSUE_TEMPLATE/config.yml | 5 + .../slate/.github/PULL_REQUEST_TEMPLATE.md | 5 + app/docs/slate/.github/workflows/build.yml | 42 + app/docs/slate/.github/workflows/deploy.yml | 41 + .../slate/.github/workflows/dev_deploy.yml | 50 + app/docs/slate/.github/workflows/publish.yml | 22 + app/docs/slate/.gitignore | 27 + app/docs/slate/CHANGELOG.md | 254 + app/docs/slate/CODE_OF_CONDUCT.md | 46 + app/docs/slate/Gemfile | 12 + app/docs/slate/Gemfile.lock | 136 + app/docs/slate/LICENSE | 201 + app/docs/slate/README.md | 81 + app/docs/slate/Vagrantfile | 46 + app/docs/slate/config.rb | 65 + app/docs/slate/deploy.sh | 226 + app/docs/slate/font-selection.json | 148 + app/docs/slate/lib/monokai_sublime_slate.rb | 95 + app/docs/slate/lib/multilang.rb | 16 + app/docs/slate/lib/nesting_unique_head.rb | 22 + app/docs/slate/lib/toc_data.rb | 31 + app/docs/slate/lib/unique_head.rb | 24 + app/docs/slate/slate.sh | 248 + app/docs/slate/source/api.html.md | 36 + app/docs/slate/source/fonts/slate.eot | Bin 0 -> 1876 bytes app/docs/slate/source/fonts/slate.svg | 14 + app/docs/slate/source/fonts/slate.ttf | Bin 0 -> 1720 bytes app/docs/slate/source/fonts/slate.woff | Bin 0 -> 1796 bytes app/docs/slate/source/fonts/slate.woff2 | Bin 0 -> 796 bytes app/docs/slate/source/images/logo.png | Bin 0 -> 3591 bytes app/docs/slate/source/images/logoWilte.png | Bin 0 -> 2677 bytes app/docs/slate/source/images/navbar.png | Bin 0 -> 96 bytes .../slate/source/includes/_authentication.md | 39 + app/docs/slate/source/includes/_errors.md | 22 + app/docs/slate/source/includes/_gitignores.md | 47 + app/docs/slate/source/includes/_issues.md | 1 + app/docs/slate/source/includes/_licenses.md | 57 + .../slate/source/includes/_organizations.md | 1 + app/docs/slate/source/includes/_projects.md | 401 + app/docs/slate/source/includes/_pulls.md | 1 + .../slate/source/includes/_repositories.md | 621 + app/docs/slate/source/includes/_teams.md | 1 + app/docs/slate/source/includes/_users.md | 42 + app/docs/slate/source/javascripts/all.js | 2 + .../slate/source/javascripts/all_nosearch.js | 27 + .../slate/source/javascripts/app/_copy.js | 15 + .../slate/source/javascripts/app/_lang.js | 164 + .../slate/source/javascripts/app/_search.js | 102 + app/docs/slate/source/javascripts/app/_toc.js | 122 + .../slate/source/javascripts/lib/_energize.js | 169 + .../javascripts/lib/_imagesloaded.min.js | 7 + .../javascripts/lib/_jquery.highlight.js | 108 + .../slate/source/javascripts/lib/_jquery.js | 10872 ++++++++++++++++ .../slate/source/javascripts/lib/_lunr.js | 3475 +++++ app/docs/slate/source/layouts/layout.erb | 128 + .../slate/source/stylesheets/_icon-font.scss | 38 + .../slate/source/stylesheets/_normalize.scss | 427 + app/docs/slate/source/stylesheets/_rtl.scss | 140 + .../slate/source/stylesheets/_variables.scss | 103 + .../slate/source/stylesheets/print.css.scss | 153 + .../slate/source/stylesheets/screen.css.scss | 634 + build_api_docs.sh | 5 + public/docs/api.html | 2606 ++++ public/docs/fonts/slate-7b7da4fe.ttf | Bin 0 -> 1720 bytes public/docs/fonts/slate-cfc9d06b.eot | Bin 0 -> 1876 bytes public/docs/fonts/slate-e55b8307.svg | 14 + public/docs/fonts/slate.woff | Bin 0 -> 1796 bytes public/docs/fonts/slate.woff2 | Bin 0 -> 796 bytes public/docs/images/logo-b38b63e6.png | Bin 0 -> 3591 bytes public/docs/images/logoWilte-81907910.png | Bin 0 -> 2677 bytes public/docs/images/navbar-cad8cdcb.png | Bin 0 -> 96 bytes public/docs/javascripts/all-e033bdd3.js | 120 + .../docs/javascripts/all_nosearch-ec00d1ce.js | 31 + public/docs/stylesheets/print-953e3353.css | 1 + public/docs/stylesheets/screen-cf7c3c82.css | 1 + 79 files changed, 22633 insertions(+) create mode 100644 app/docs/slate/.dockerignore create mode 100644 app/docs/slate/.editorconfig create mode 100644 app/docs/slate/.gitattributes create mode 100644 app/docs/slate/.github/ISSUE_TEMPLATE/bug.md create mode 100644 app/docs/slate/.github/ISSUE_TEMPLATE/config.yml create mode 100644 app/docs/slate/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 app/docs/slate/.github/workflows/build.yml create mode 100644 app/docs/slate/.github/workflows/deploy.yml create mode 100644 app/docs/slate/.github/workflows/dev_deploy.yml create mode 100644 app/docs/slate/.github/workflows/publish.yml create mode 100644 app/docs/slate/.gitignore create mode 100644 app/docs/slate/CHANGELOG.md create mode 100644 app/docs/slate/CODE_OF_CONDUCT.md create mode 100644 app/docs/slate/Gemfile create mode 100644 app/docs/slate/Gemfile.lock create mode 100644 app/docs/slate/LICENSE create mode 100644 app/docs/slate/README.md create mode 100644 app/docs/slate/Vagrantfile create mode 100644 app/docs/slate/config.rb create mode 100755 app/docs/slate/deploy.sh create mode 100755 app/docs/slate/font-selection.json create mode 100644 app/docs/slate/lib/monokai_sublime_slate.rb create mode 100644 app/docs/slate/lib/multilang.rb create mode 100644 app/docs/slate/lib/nesting_unique_head.rb create mode 100644 app/docs/slate/lib/toc_data.rb create mode 100644 app/docs/slate/lib/unique_head.rb create mode 100755 app/docs/slate/slate.sh create mode 100644 app/docs/slate/source/api.html.md create mode 100644 app/docs/slate/source/fonts/slate.eot create mode 100644 app/docs/slate/source/fonts/slate.svg create mode 100644 app/docs/slate/source/fonts/slate.ttf create mode 100644 app/docs/slate/source/fonts/slate.woff create mode 100644 app/docs/slate/source/fonts/slate.woff2 create mode 100644 app/docs/slate/source/images/logo.png create mode 100644 app/docs/slate/source/images/logoWilte.png create mode 100644 app/docs/slate/source/images/navbar.png create mode 100644 app/docs/slate/source/includes/_authentication.md create mode 100644 app/docs/slate/source/includes/_errors.md create mode 100644 app/docs/slate/source/includes/_gitignores.md create mode 100644 app/docs/slate/source/includes/_issues.md create mode 100644 app/docs/slate/source/includes/_licenses.md create mode 100644 app/docs/slate/source/includes/_organizations.md create mode 100644 app/docs/slate/source/includes/_projects.md create mode 100644 app/docs/slate/source/includes/_pulls.md create mode 100644 app/docs/slate/source/includes/_repositories.md create mode 100644 app/docs/slate/source/includes/_teams.md create mode 100644 app/docs/slate/source/includes/_users.md create mode 100644 app/docs/slate/source/javascripts/all.js create mode 100644 app/docs/slate/source/javascripts/all_nosearch.js create mode 100644 app/docs/slate/source/javascripts/app/_copy.js create mode 100644 app/docs/slate/source/javascripts/app/_lang.js create mode 100644 app/docs/slate/source/javascripts/app/_search.js create mode 100644 app/docs/slate/source/javascripts/app/_toc.js create mode 100644 app/docs/slate/source/javascripts/lib/_energize.js create mode 100644 app/docs/slate/source/javascripts/lib/_imagesloaded.min.js create mode 100644 app/docs/slate/source/javascripts/lib/_jquery.highlight.js create mode 100644 app/docs/slate/source/javascripts/lib/_jquery.js create mode 100644 app/docs/slate/source/javascripts/lib/_lunr.js create mode 100644 app/docs/slate/source/layouts/layout.erb create mode 100644 app/docs/slate/source/stylesheets/_icon-font.scss create mode 100644 app/docs/slate/source/stylesheets/_normalize.scss create mode 100644 app/docs/slate/source/stylesheets/_rtl.scss create mode 100644 app/docs/slate/source/stylesheets/_variables.scss create mode 100644 app/docs/slate/source/stylesheets/print.css.scss create mode 100644 app/docs/slate/source/stylesheets/screen.css.scss create mode 100755 build_api_docs.sh create mode 100644 public/docs/api.html create mode 100644 public/docs/fonts/slate-7b7da4fe.ttf create mode 100644 public/docs/fonts/slate-cfc9d06b.eot create mode 100644 public/docs/fonts/slate-e55b8307.svg create mode 100644 public/docs/fonts/slate.woff create mode 100644 public/docs/fonts/slate.woff2 create mode 100644 public/docs/images/logo-b38b63e6.png create mode 100644 public/docs/images/logoWilte-81907910.png create mode 100644 public/docs/images/navbar-cad8cdcb.png create mode 100644 public/docs/javascripts/all-e033bdd3.js create mode 100644 public/docs/javascripts/all_nosearch-ec00d1ce.js create mode 100644 public/docs/stylesheets/print-953e3353.css create mode 100644 public/docs/stylesheets/screen-cf7c3c82.css diff --git a/app/docs/slate/.dockerignore b/app/docs/slate/.dockerignore new file mode 100644 index 000000000..1cf061121 --- /dev/null +++ b/app/docs/slate/.dockerignore @@ -0,0 +1,2 @@ +build/ +.github/ diff --git a/app/docs/slate/.editorconfig b/app/docs/slate/.editorconfig new file mode 100644 index 000000000..1692977ce --- /dev/null +++ b/app/docs/slate/.editorconfig @@ -0,0 +1,18 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.rb] +charset = utf-8 + +[*.md] +trim_trailing_whitespace = false diff --git a/app/docs/slate/.gitattributes b/app/docs/slate/.gitattributes new file mode 100644 index 000000000..3069c4323 --- /dev/null +++ b/app/docs/slate/.gitattributes @@ -0,0 +1 @@ +source/javascripts/lib/* linguist-vendored diff --git a/app/docs/slate/.github/ISSUE_TEMPLATE/bug.md b/app/docs/slate/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 000000000..25fcdb1d2 --- /dev/null +++ b/app/docs/slate/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,22 @@ +--- +name: Report a Bug +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Bug Description** +A clear and concise description of what the bug is and how to reproduce it. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Browser (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Last upstream Slate commit (run `git log --author="Robert Lord" | head -n 1`):** +Put the commit hash here diff --git a/app/docs/slate/.github/ISSUE_TEMPLATE/config.yml b/app/docs/slate/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..16f4beed6 --- /dev/null +++ b/app/docs/slate/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Questions, Ideas, Discussions + url: https://github.com/slatedocs/slate/discussions + about: Ask and answer questions, and propose new features. diff --git a/app/docs/slate/.github/PULL_REQUEST_TEMPLATE.md b/app/docs/slate/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..151e45d78 --- /dev/null +++ b/app/docs/slate/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/app/docs/slate/.github/workflows/build.yml b/app/docs/slate/.github/workflows/build.yml new file mode 100644 index 000000000..c9ec0eccb --- /dev/null +++ b/app/docs/slate/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + + - uses: actions/cache@v2 + with: + path: vendor/bundle + key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + gems-${{ runner.os }}-${{ matrix.ruby-version }}- + gems-${{ runner.os }}- + + # necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache + # can remove once ruby 2.3 is no longer supported + - run: gem update --system + + - run: bundle config set deployment 'true' + - name: bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - run: bundle exec middleman build diff --git a/app/docs/slate/.github/workflows/deploy.yml b/app/docs/slate/.github/workflows/deploy.yml new file mode 100644 index 000000000..341cd5f7f --- /dev/null +++ b/app/docs/slate/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy + +on: + push: + branches: [ 'main' ] + +jobs: + deploy: + runs-on: ubuntu-latest + env: + ruby-version: 2.5 + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.ruby-version }} + + - uses: actions/cache@v2 + with: + path: vendor/bundle + key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + gems-${{ runner.os }}-${{ matrix.ruby-version }}- + gems-${{ runner.os }}- + + - run: bundle config set deployment 'true' + - name: bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - run: bundle exec middleman build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + keep_files: true diff --git a/app/docs/slate/.github/workflows/dev_deploy.yml b/app/docs/slate/.github/workflows/dev_deploy.yml new file mode 100644 index 000000000..7f1a40abf --- /dev/null +++ b/app/docs/slate/.github/workflows/dev_deploy.yml @@ -0,0 +1,50 @@ +name: Dev Deploy + +on: + push: + branches: [ 'dev' ] + +jobs: + deploy: + runs-on: ubuntu-latest + env: + ruby-version: 2.5 + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.ruby-version }} + + - uses: actions/cache@v2 + with: + path: vendor/bundle + key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + gems-${{ runner.os }}-${{ matrix.ruby-version }}- + gems-${{ runner.os }}- + + - run: bundle config set deployment 'true' + - name: bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - run: bundle exec middleman build + + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_KEY }} + repository: slatedocs/slate + tag_with_ref: true + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3.7.0-8 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + destination_dir: dev + publish_dir: ./build + keep_files: true diff --git a/app/docs/slate/.github/workflows/publish.yml b/app/docs/slate/.github/workflows/publish.yml new file mode 100644 index 000000000..d57930a58 --- /dev/null +++ b/app/docs/slate/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_KEY }} + repository: slatedocs/slate + tag_with_ref: true + tags: latest diff --git a/app/docs/slate/.gitignore b/app/docs/slate/.gitignore new file mode 100644 index 000000000..1d5d08dd2 --- /dev/null +++ b/app/docs/slate/.gitignore @@ -0,0 +1,27 @@ +*.gem +*.rbc +.bundle +.config +coverage +InstalledFiles +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp +*.DS_STORE +build/ +.cache +.vagrant +.sass-cache + +# YARD artifacts +.yardoc +_yardoc +doc/ +.idea/ + +# Vagrant artifacts +ubuntu-*-console.log diff --git a/app/docs/slate/CHANGELOG.md b/app/docs/slate/CHANGELOG.md new file mode 100644 index 000000000..1ffe3eb85 --- /dev/null +++ b/app/docs/slate/CHANGELOG.md @@ -0,0 +1,254 @@ +# Changelog + +## Version 2.8.0 + +*October 27, 2020* + +* Remove last trailing newline when using the copy code button +* Rework docker image and make available at slatedocs/slate +* Improve Dockerfile layout to improve caching (thanks @micvbang) +* Bump rouge from 3.20 to 3.24 +* Bump nokogiri from 1.10.9 to 1.10.10 +* Bump middleman from 4.3.8 to 4.3.11 +* Bump lunr.js from 2.3.8 to 2.3.9 + +## Version 2.7.1 + +*August 13, 2020* + +* __[security]__ Bumped middleman from 4.3.7 to 4.3.8 + +_Note_: Slate uses redcarpet, not kramdown, for rendering markdown to HTML, and so was unaffected by the security vulnerability in middleman. +If you have changed slate to use kramdown, and with GFM, you may need to install the `kramdown-parser-gfm` gem. + +## Version 2.7.0 + +*June 21, 2020* + +* __[security]__ Bumped rack in Gemfile.lock from 2.2.2 to 2.2.3 +* Bumped bundled jQuery from 3.2.1 to 3.5.1 +* Bumped bundled lunr from 0.5.7 to 2.3.8 +* Bumped imagesloaded from 3.1.8 to 4.1.4 +* Bumped rouge from 3.17.0 to 3.20.0 +* Bumped redcarpet from 3.4.0 to 3.5.0 +* Fix color of highlighted code being unreadable when printing page +* Add clipboard icon for "Copy to Clipboard" functionality to code boxes (see note below) +* Fix handling of ToC selectors that contain punctutation (thanks @gruis) +* Fix language bar truncating languages that overflow screen width +* Strip HTML tags from ToC title before displaying it in title bar in JS (backup to stripping done in Ruby code) (thanks @atic) + +To enable the new clipboard icon, you need to add `code_clipboard: true` to the frontmatter of source/index.html.md. +See [this line](https://github.com/slatedocs/slate/blame/main/source/index.html.md#L19) for an example of usage. + +## Version 2.6.1 + +*May 30, 2020* + +* __[security]__ update child dependency activesupport in Gemfile.lock to 5.4.2.3 +* Update Middleman in Gemfile.lock to 4.3.7 +* Replace Travis-CI with GitHub actions for continuous integration +* Replace Spectrum with GitHub discussions + +## Version 2.6.0 + +*May 18, 2020* + +__Note__: 2.5.0 was "pulled" due to a breaking bug discovered after release. It is recommended to skip it, and move straight to 2.6.0. + +* Fix large whitespace gap in middle column for sections with codeblocks +* Fix highlighted code elements having a different background than rest of code block +* Change JSON keys to have a different font color than their values +* Disable asset hashing for woff and woff2 elements due to middleman bug breaking woff2 asset hashing in general +* Move Dockerfile to Debian from Alpine +* Converted repo to a [GitHub template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-template-repository) +* Update sassc to 2.3.0 in Gemfile.lock + +## Version 2.5.0 + +*May 8, 2020* + +* __[security]__ update nokogiri to ~> 1.10.8 +* Update links in example docs to https://github.com/slatedocs/slate from https://github.com/lord/slate +* Update LICENSE to include full Apache 2.0 text +* Test slate against Ruby 2.5 and 2.6 on Travis-CI +* Update Vagrantfile to use Ubuntu 18.04 (thanks @bradthurber) +* Parse arguments and flags for deploy.sh on script start, instead of potentially after building source files +* Install nodejs inside Vagrantfile (thanks @fernandoaguilar) +* Add Dockerfile for running slate (thanks @redhatxl) +* update middleman-syntax and rouge to ~>3.2 +* update middleman to 4.3.6 + +## Version 2.4.0 + +*October 19, 2019* + +- Move repository from lord/slate to slatedocs/slate +- Fix documentation to point at new repo link, thanks to [Arun](https://github.com/slash-arun), [Gustavo Gawryszewski](https://github.com/gawry), and [Daniel Korbit](https://github.com/danielkorbit) +- Update `nokogiri` to 1.10.4 +- Update `ffi` in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jakemack](https://github.com/jakemack) +- Update `rack` to 2.0.7 in `Gemfile.lock` to fix security warnings, thanks to [Grey Baker](https://github.com/greysteil) and [jakemack](https://github.com/jakemack) +- Update middleman to `4.3` and relax constraints on middleman related gems, thanks to [jakemack](https://github.com/jakemack) +- Add sass gem, thanks to [jakemack](https://github.com/jakemack) +- Activate `asset_cache` in middleman to improve cacheability of static files, thanks to [Sam Gilman](https://github.com/thenengah) +- Update to using bundler 2 for `Gemfile.lock`, thanks to [jakemack](https://github.com/jakemack) + +## Version 2.3.1 + +*July 5, 2018* + +- Update `sprockets` in `Gemfile.lock` to fix security warnings + +## Version 2.3 + +*July 5, 2018* + +- Allows strikethrough in markdown by default. +- Upgrades jQuery to 3.2.1, thanks to [Tomi Takussaari](https://github.com/TomiTakussaari) +- Fixes invalid HTML in `layout.erb`, thanks to [Eric Scouten](https://github.com/scouten) for pointing out +- Hopefully fixes Vagrant memory issues, thanks to [Petter Blomberg](https://github.com/p-blomberg) for the suggestion +- Cleans HTML in headers before setting `document.title`, thanks to [Dan Levy](https://github.com/justsml) +- Allows trailing whitespace in markdown files, thanks to [Samuel Cousin](https://github.com/kuzyn) +- Fixes pushState/replaceState problems with scrolling not changing the document hash, thanks to [Andrey Fedorov](https://github.com/anfedorov) +- Removes some outdated examples, thanks [@al-tr](https://github.com/al-tr), [Jerome Dahdah](https://github.com/jdahdah), and [Ricardo Castro](https://github.com/mccricardo) +- Fixes `nav-padding` bug, thanks [Jerome Dahdah](https://github.com/jdahdah) +- Code style fixes thanks to [Sebastian Zaremba](https://github.com/vassyz) +- Nokogiri version bump thanks to [Grey Baker](https://github.com/greysteil) +- Fix to default `index.md` text thanks to [Nick Busey](https://github.com/NickBusey) + +Thanks to everyone who contributed to this release! + +## Version 2.2 + +*January 19, 2018* + +- Fixes bugs with some non-roman languages not generating unique headers +- Adds editorconfig, thanks to [Jay Thomas](https://github.com/jaythomas) +- Adds optional `NestingUniqueHeadCounter`, thanks to [Vladimir Morozov](https://github.com/greenhost87) +- Small fixes to typos and language, thx [Emir Ribić](https://github.com/ribice), [Gregor Martynus](https://github.com/gr2m), and [Martius](https://github.com/martiuslim)! +- Adds links to Spectrum chat for questions in README and ISSUE_TEMPLATE + +## Version 2.1 + +*October 30, 2017* + +- Right-to-left text stylesheet option, thanks to [Mohammad Hossein Rabiee](https://github.com/mhrabiee) +- Fix for HTML5 history state bug, thanks to [Zach Toolson](https://github.com/ztoolson) +- Small styling changes, typo fixes, small bug fixes from [Marian Friedmann](https://github.com/rnarian), [Ben Wilhelm](https://github.com/benwilhelm), [Fouad Matin](https://github.com/fouad), [Nicolas Bonduel](https://github.com/NicolasBonduel), [Christian Oliff](https://github.com/coliff) + +Thanks to everyone who submitted PRs for this version! + +## Version 2.0 + +*July 17, 2017* + +- All-new statically generated table of contents + - Should be much faster loading and scrolling for large pages + - Smaller Javascript file sizes + - Avoids the problem with the last link in the ToC not ever highlighting if the section was shorter than the page + - Fixes control-click not opening in a new page + - Automatically updates the HTML title as you scroll +- Updated design + - New default colors! + - New spacings and sizes! + - System-default typefaces, just like GitHub +- Added search input delay on large corpuses to reduce lag +- We even bumped the major version cause hey, why not? +- Various small bug fixes + +Thanks to everyone who helped debug or wrote code for this version! It was a serious community effort, and I couldn't have done it alone. + +## Version 1.5 + +*February 23, 2017* + +- Add [multiple tabs per programming language](https://github.com/lord/slate/wiki/Multiple-language-tabs-per-programming-language) feature +- Upgrade Middleman to add Ruby 1.4.0 compatibility +- Switch default code highlighting color scheme to better highlight JSON +- Various small typo and bug fixes + +## Version 1.4 + +*November 24, 2016* + +- Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs +- Update some links in README +- Fix broken Vagrant startup script +- Fix some problems with deploy.sh help message +- Fix bug with language tabs not hiding properly if no error +- Add `!default` to SASS variables +- Fix bug with logo margin +- Bump tested Ruby versions in .travis.yml + +## Version 1.3.3 + +*June 11, 2016* + +Documentation and example changes. + +## Version 1.3.2 + +*February 3, 2016* + +A small bugfix for slightly incorrect background colors on code samples in some cases. + +## Version 1.3.1 + +*January 31, 2016* + +A small bugfix for incorrect whitespace in code blocks. + +## Version 1.3 + +*January 27, 2016* + +We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs. + +Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages. + +## Version 1.2 + +*June 20, 2015* + +**Fixes:** + +- Remove crash on invalid languages +- Update Tocify to scroll to the highlighted header in the Table of Contents +- Fix variable leak and update search algorithms +- Update Python examples to be valid Python +- Update gems +- More misc. bugfixes of Javascript errors +- Add Dockerfile +- Remove unused gems +- Optimize images, fonts, and generated asset files +- Add chinese font support +- Remove RedCarpet header ID patch +- Update language tabs to not disturb existing query strings + +## Version 1.1 + +*July 27, 2014* + +**Fixes:** + +- Finally, a fix for the redcarpet upgrade bug + +## Version 1.0 + +*July 2, 2014* + +[View Issues](https://github.com/tripit/slate/issues?milestone=1&state=closed) + +**Features:** + +- Responsive designs for phones and tablets +- Started tagging versions + +**Fixes:** + +- Fixed 'unrecognized expression' error +- Fixed #undefined hash bug +- Fixed bug where the current language tab would be unselected +- Fixed bug where tocify wouldn't highlight the current section while searching +- Fixed bug where ids of header tags would have special characters that caused problems +- Updated layout so that pages with disabled search wouldn't load search.js +- Cleaned up Javascript diff --git a/app/docs/slate/CODE_OF_CONDUCT.md b/app/docs/slate/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..cc17fd98d --- /dev/null +++ b/app/docs/slate/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@lord.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/app/docs/slate/Gemfile b/app/docs/slate/Gemfile new file mode 100644 index 000000000..9a318414e --- /dev/null +++ b/app/docs/slate/Gemfile @@ -0,0 +1,12 @@ +ruby '>=2.3.1' +source 'https://gems.ruby-china.com' + +# Middleman +gem 'middleman', '~>4.3' +gem 'middleman-syntax', '~> 3.2' +gem 'middleman-autoprefixer', '~> 2.7' +gem 'middleman-sprockets', '~> 4.1' +gem 'rouge', '~> 3.21' +gem 'redcarpet', '~> 3.5.0' +gem 'nokogiri', '~> 1.10.8' +gem 'sass' diff --git a/app/docs/slate/Gemfile.lock b/app/docs/slate/Gemfile.lock new file mode 100644 index 000000000..44028888c --- /dev/null +++ b/app/docs/slate/Gemfile.lock @@ -0,0 +1,136 @@ +GEM + remote: https://gems.ruby-china.com/ + specs: + activesupport (5.2.4.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + autoprefixer-rails (9.5.1.1) + execjs + backports (3.18.2) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.1.7) + contracts (0.13.0) + dotenv (2.7.6) + erubis (2.7.0) + execjs (2.7.0) + fast_blank (1.0.0) + fastimage (2.2.0) + ffi (1.13.1) + haml (5.1.2) + temple (>= 0.8.0) + tilt + hamster (3.0.0) + concurrent-ruby (~> 1.0) + hashie (3.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + kramdown (2.3.0) + rexml + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + memoist (0.16.2) + middleman (4.3.11) + coffee-script (~> 2.2) + haml (>= 4.0.5) + kramdown (>= 2.3.0) + middleman-cli (= 4.3.11) + middleman-core (= 4.3.11) + middleman-autoprefixer (2.10.1) + autoprefixer-rails (~> 9.1) + middleman-core (>= 3.3.3) + middleman-cli (4.3.11) + thor (>= 0.17.0, < 2.0) + middleman-core (4.3.11) + activesupport (>= 4.2, < 6.0) + addressable (~> 2.3) + backports (~> 3.6) + bundler + contracts (~> 0.13.0) + dotenv + erubis + execjs (~> 2.0) + fast_blank + fastimage (~> 2.0) + hamster (~> 3.0) + hashie (~> 3.4) + i18n (~> 0.9.0) + listen (~> 3.0.0) + memoist (~> 0.14) + padrino-helpers (~> 0.13.0) + parallel + rack (>= 1.4.5, < 3) + sassc (~> 2.0) + servolux + tilt (~> 2.0.9) + uglifier (~> 3.0) + middleman-sprockets (4.1.1) + middleman-core (~> 4.0) + sprockets (>= 3.0) + middleman-syntax (3.2.0) + middleman-core (>= 3.2) + rouge (~> 3.2) + mini_portile2 (2.4.0) + minitest (5.14.2) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + padrino-helpers (0.13.3.4) + i18n (~> 0.6, >= 0.6.7) + padrino-support (= 0.13.3.4) + tilt (>= 1.4.1, < 3) + padrino-support (0.13.3.4) + activesupport (>= 3.1) + parallel (1.19.2) + public_suffix (4.0.6) + rack (2.2.3) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) + ffi (~> 1.0) + redcarpet (3.5.0) + rexml (3.2.4) + rouge (3.24.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sassc (2.4.0) + ffi (~> 1.9) + servolux (0.13.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + temple (0.8.2) + thor (1.0.1) + thread_safe (0.3.6) + tilt (2.0.10) + tzinfo (1.2.7) + thread_safe (~> 0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + +PLATFORMS + ruby + +DEPENDENCIES + middleman (~> 4.3) + middleman-autoprefixer (~> 2.7) + middleman-sprockets (~> 4.1) + middleman-syntax (~> 3.2) + nokogiri (~> 1.10.8) + redcarpet (~> 3.5.0) + rouge (~> 3.21) + sass + +RUBY VERSION + ruby 2.3.3p222 + +BUNDLED WITH + 2.1.4 diff --git a/app/docs/slate/LICENSE b/app/docs/slate/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/app/docs/slate/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/app/docs/slate/README.md b/app/docs/slate/README.md new file mode 100644 index 000000000..7d15f8646 --- /dev/null +++ b/app/docs/slate/README.md @@ -0,0 +1,81 @@ +
+ +Slate helps you create beautiful, intelligent, responsive API documentation.
+ +The example above was created with Slate. Check it out at slatedocs.github.io/slate.
+ +Features +------------ + +* **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [PayPal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print. + +* **Everything on a single page** — Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy. + +* **Slate is just Markdown** — When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks. + +* **Write code samples in multiple languages** — If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with GitHub Flavored Markdown. + +* **Out-of-the-box syntax highlighting** for [over 100 languages](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required. + +* **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents. + +* **Let your users update your documentation for you** — By default, your Slate-generated documentation is hosted in a public GitHub repository. Not only does this mean you get free hosting for your docs with GitHub Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere. + +* **RTL Support** Full right-to-left layout for RTL languages such as Arabic, Persian (Farsi), Hebrew etc. + +Getting started with Slate is super easy! Simply press the green "use this template" button above and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](https://slatedocs.github.io/slate/). + +Getting Started with Slate +------------------------------ + +To get started with Slate, please check out the [Getting Started](https://github.com/slatedocs/slate/wiki#getting-started) +section in our [wiki](https://github.com/slatedocs/slate/wiki). + +We support running Slate in three different ways: +* [Natively](https://github.com/slatedocs/slate/wiki/Using-Slate-Natively) +* [Using Vagrant](https://github.com/slatedocs/slate/wiki/Using-Slate-in-Vagrant) +* [Using Docker](https://github.com/slatedocs/slate/wiki/Using-Slate-in-Docker) + +Companies Using Slate +--------------------------------- + +* [NASA](https://api.nasa.gov) +* [Sony](http://developers.cimediacloud.com) +* [Best Buy](https://bestbuyapis.github.io/api-documentation/) +* [Travis-CI](https://docs.travis-ci.com/api/) +* [Greenhouse](https://developers.greenhouse.io/harvest.html) +* [WooCommerce](http://woocommerce.github.io/woocommerce-rest-api-docs/) +* [Dwolla](https://docs.dwolla.com/) +* [Clearbit](https://clearbit.com/docs) +* [Coinbase](https://developers.coinbase.com/api) +* [Parrot Drones](http://developer.parrot.com/docs/bebop/) +* [Scale](https://docs.scaleapi.com/) + +You can view more in [the list on the wiki](https://github.com/slatedocs/slate/wiki/Slate-in-the-Wild). + +Questions? Need Help? Found a bug? +-------------------- + +If you've got questions about setup, deploying, special feature implementation in your fork, or just want to chat with the developer, please feel free to [start a thread in our Discussions tab](https://github.com/slatedocs/slate/discussions)! + +Found a bug with upstream Slate? Go ahead and [submit an issue](https://github.com/slatedocs/slate/issues). And, of course, feel free to submit pull requests with bug fixes or changes to the `dev` branch. + +Contributors +-------------------- + +Slate was built by [Robert Lord](https://lord.io) while at [TripIt](https://www.tripit.com/). The project is now maintained by [Matthew Peveler](https://github.com/MasterOdin) and [Mike Ralphson](https://github.com/MikeRalphson). + +Thanks to the following people who have submitted major pull requests: + +- [@chrissrogers](https://github.com/chrissrogers) +- [@bootstraponline](https://github.com/bootstraponline) +- [@realityking](https://github.com/realityking) +- [@cvkef](https://github.com/cvkef) + +Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles. diff --git a/app/docs/slate/Vagrantfile b/app/docs/slate/Vagrantfile new file mode 100644 index 000000000..4166fb6ba --- /dev/null +++ b/app/docs/slate/Vagrantfile @@ -0,0 +1,46 @@ +Vagrant.configure(2) do |config| + config.vm.box = "ubuntu/bionic64" + config.vm.network :forwarded_port, guest: 4567, host: 4567 + config.vm.provider "virtualbox" do |vb| + vb.memory = "2048" + end + + config.vm.provision "bootstrap", + type: "shell", + inline: <<-SHELL + # add nodejs v12 repository + curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - + + sudo apt-get update + sudo apt-get install -yq ruby ruby-dev + sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev + sudo apt-get autoremove -yq + gem install --no-ri --no-rdoc bundler + SHELL + + # add the local user git config to the vm + config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" + + config.vm.provision "install", + type: "shell", + privileged: false, + inline: <<-SHELL + echo "==============================================" + echo "Installing app dependencies" + cd /vagrant + bundle config build.nokogiri --use-system-libraries + bundle install + SHELL + + config.vm.provision "run", + type: "shell", + privileged: false, + run: "always", + inline: <<-SHELL + echo "==============================================" + echo "Starting up middleman at http://localhost:4567" + echo "If it does not come up, check the ~/middleman.log file for any error messages" + cd /vagrant + bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log & + SHELL +end diff --git a/app/docs/slate/config.rb b/app/docs/slate/config.rb new file mode 100644 index 000000000..4c51315d4 --- /dev/null +++ b/app/docs/slate/config.rb @@ -0,0 +1,65 @@ +set :build_dir, '../../../public/docs/' + +# Unique header generation +require './lib/unique_head.rb' + +# Markdown +set :markdown_engine, :redcarpet +set :markdown, + fenced_code_blocks: true, + smartypants: true, + disable_indented_code_blocks: true, + prettify: true, + strikethrough: true, + tables: true, + with_toc_data: true, + no_intra_emphasis: true, + renderer: UniqueHeadCounter + +# Assets +set :css_dir, 'stylesheets' +set :js_dir, 'javascripts' +set :images_dir, 'images' +set :fonts_dir, 'fonts' + +# Activate the syntax highlighter +activate :syntax +ready do + require './lib/monokai_sublime_slate.rb' + require './lib/multilang.rb' +end + +activate :sprockets + +activate :autoprefixer do |config| + config.browsers = ['last 2 version', 'Firefox ESR'] + config.cascade = false + config.inline = true +end + +# Github pages require relative links +activate :relative_assets +set :relative_links, true + +# Build Configuration +configure :build do + # We do want to hash woff and woff2 as there's a bug where woff2 will use + # woff asset hash which breaks things. Trying to use a combination of ignore and + # rewrite_ignore does not work as it conflicts weirdly with relative_assets. Disabling + # the .woff2 extension only does not work as .woff will still activate it so have to + # have both. See https://github.com/slatedocs/slate/issues/1171 for more details. + activate :asset_hash, :exts => app.config[:asset_extensions] - %w[.woff .woff2] + # If you're having trouble with Middleman hanging, commenting + # out the following two lines has been known to help + activate :minify_css + activate :minify_javascript + # activate :gzip +end + +# Deploy Configuration +# If you want Middleman to listen on a different port, you can set that below +set :port, 4567 + +helpers do + require './lib/toc_data.rb' +end diff --git a/app/docs/slate/deploy.sh b/app/docs/slate/deploy.sh new file mode 100755 index 000000000..9dbd7db9c --- /dev/null +++ b/app/docs/slate/deploy.sh @@ -0,0 +1,226 @@ +#!/usr/bin/env bash +set -o errexit #abort if any command fails +me=$(basename "$0") + +help_message="\ +Usage: $me [-c FILE] [