Skip to content

Commit d2371a7

Browse files
committed
Merge branch 'master' of https://github.com/lord/slate
# By Robert Lord (24) and others # Via Robert Lord * 'master' of https://github.com/lord/slate: (33 commits) Update_errors.md (#815) Create CODE_OF_CONDUCT.md Add a few more release notes Add 2.0.0 release notes Add note about language tabs as comment in default yaml frontmatter Fix bug with initial load of ToC always jumping to top Update Vagrant to Ruby 2.4 (#803) Add JavaScript Runtime to Readme (#796) Add configurable keypress delay before initiating search (#764) Remove old ruby from travis Fix bug where head count always got larger across reloads Solve improperly nested header problem, fixes #711 Update sponsor explanation text in readme Require Ruby 2.3.1 Update issue template again Update PR template Add new issue template Update README.md (#787) Vagrant file fix for ubuntu/trusty64 (#769) Adds unique header creation (#743) ... Conflicts: source/includes/_errors.md source/index.html.md source/javascripts/app/_lang.js source/javascripts/app/_toc.js source/layouts/layout.erb
2 parents 8e6841a + bdb6930 commit d2371a7

24 files changed

+427
-1788
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
If this is a question or feature request, make sure to:
1+
<!--
2+
⚠️ READ THIS BEFORE SUBMITTING ⚠️
23
3-
- [ ] The title starts with `Question:` or `Feature:`.
4+
• Prefix questions and feature requests with either Question: or Feature:
5+
• If this is a bug report or question about an issue you're having, make sure to include the form below in your issue
6+
-->
47

5-
If this is an bug report, not a question, make sure to:
8+
Operating system: ✍️ TODO
9+
Last upstream commit (run `git log --author="Robert Lord" | head -n 1`): ✍️ TODO
10+
Browser version(s): ✍️ TODO
11+
Ruby version (run `ruby -v`): ✍️ TODO
612

7-
- [ ] I'm not running Windows (which is unsupported), or if I am, I can confirm this issue appears on another platform, or Vagrant.
8-
- [ ] This issue appears in the latest `dev` branch.
9-
- [ ] I've included my browser and Ruby version in this issue.
13+
---
14+
15+
✍️ TODO write your issue here

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
!!!!! STOP AND READ !!!!!
1+
<!--
2+
⚠️ 🚨 ⚠️ STOP AND READ THIS ⚠️ 🚨 ⚠️
23
3-
If the dropdown above says "base fork: lord/master", you are submitting your change to ALL USERS OF SLATE, not just your company. This is probably not what you want. Click "base fork" to change it to the right place.
4-
5-
If you're actually trying to submit a change to upstream Slate, please submit to our dev branch, PRs sent to the master branch are generally rejected.
4+
👆👆 see that 'base fork' dropdown above? You should change it! The default value of "lord/slate" submits your change to ALL USERS OF SLATE, not just your company. This is PROBABLY NOT WHAT YOU WANT.
5+
-->

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ sudo: false
33
language: ruby
44

55
rvm:
6-
- 2.2.5
76
- 2.3.3
87
- 2.4.0
98

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## Version 2.0.0
4+
5+
*July 17, 2017*
6+
7+
- All-new statically generated table of contents
8+
- Should be much faster loading and scrolling for large pages
9+
- Smaller Javascript file sizes
10+
- Avoids the problem with the last link in the ToC not ever highlighting if the section was shorter than the page
11+
- Fixes control-click not opening in a new page
12+
- Automatically updates the HTML title as you scroll
13+
- Updated design
14+
- New default colors!
15+
- New spacings and sizes!
16+
- System-default typefaces, just like GitHub
17+
- Added search input delay on large corpuses to reduce lag
18+
- We even bumped the major version cause hey, why not?
19+
- Various small bug fixes
20+
21+
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.
22+
323
## Version 1.5.0
424

525
*February 23, 2017*

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
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.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
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.
28+
29+
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.
30+
31+
## Scope
32+
33+
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.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. 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.
38+
39+
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.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ruby '>=2.3.1'
12
source 'https://rubygems.org'
23

34
# Middleman
@@ -7,3 +8,4 @@ gem 'middleman-autoprefixer', '~> 2.7.0'
78
gem "middleman-sprockets", "~> 4.1.0"
89
gem 'rouge', '~> 2.0.5'
910
gem 'redcarpet', '~> 3.4.0'
11+
gem 'nokogiri', '~> 1.6.8'

Gemfile.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ GEM
7979
middleman-syntax (3.0.0)
8080
middleman-core (>= 3.2)
8181
rouge (~> 2.0)
82+
mini_portile2 (2.1.0)
8283
minitest (5.10.1)
84+
nokogiri (1.6.8.1)
85+
mini_portile2 (~> 2.1.0)
8386
padrino-helpers (0.13.3.3)
8487
i18n (~> 0.6, >= 0.6.7)
8588
padrino-support (= 0.13.3.3)
@@ -115,8 +118,12 @@ DEPENDENCIES
115118
middleman-autoprefixer (~> 2.7.0)
116119
middleman-sprockets (~> 4.1.0)
117120
middleman-syntax (~> 3.0.0)
121+
nokogiri (~> 1.6.8)
118122
redcarpet (~> 3.4.0)
119123
rouge (~> 2.0.5)
120124

125+
RUBY VERSION
126+
ruby 2.3.3p222
127+
121128
BUNDLED WITH
122-
1.14.3
129+
1.14.5

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Getting Started with Slate
3737
You're going to need:
3838

3939
- **Linux or OS X** — Windows may work, but is unsupported.
40-
- **Ruby, version 2.2.5 or newer**
40+
- **Ruby, version 2.3.1 or newer**
4141
- **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal.
4242

4343
### Getting Set Up
@@ -62,13 +62,16 @@ Now that Slate is all set up on your machine, you'll probably want to learn more
6262

6363
If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/lord/slate/wiki/Docker).
6464

65+
### Note on JavaScript Runtime
66+
67+
For those who don't have JavaScript runtime or are experiencing JavaScript runtime issues with ExecJS, it is recommended to add the [rubyracer gem](https://github.com/cowboyd/therubyracer) to your gemfile and run `bundle` again.
68+
6569
Companies Using Slate
6670
---------------------------------
6771

6872
* [NASA](https://api.nasa.gov)
6973
* [IBM](https://docs.cloudant.com/api.html)
7074
* [Sony](http://developers.cimediacloud.com)
71-
* [Mozilla](http://localforage.github.io/localForage/)
7275
* [Best Buy](https://bestbuyapis.github.io/api-documentation/)
7376
* [Travis-CI](https://docs.travis-ci.com/api/)
7477
* [Greenhouse](https://developers.greenhouse.io/harvest.html)
@@ -100,7 +103,7 @@ Thanks to the following people who have submitted major pull requests:
100103
- [@realityking](https://github.com/realityking)
101104
- [@cvkef](https://github.com/cvkef)
102105

103-
Also, thanks to [Sauce Labs](http://saucelabs.com) for helping sponsor the project.
106+
Also, thanks to [Sauce Labs](http://saucelabs.com) for sponsoring the development of the responsive styles.
104107

105108
Special Thanks
106109
--------------------

Vagrantfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ Vagrant.configure(2) do |config|
55
config.vm.provision "bootstrap",
66
type: "shell",
77
inline: <<-SHELL
8+
sudo apt-add-repository ppa:brightbox/ruby-ng
89
sudo apt-get update
9-
sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev
10+
sudo apt-get install -yq ruby2.4 ruby2.4-dev
11+
sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
1012
sudo apt-get autoremove -yq
11-
gem2.0 install --no-ri --no-rdoc bundler
13+
gem2.4 install --no-ri --no-rdoc bundler
1214
SHELL
1315

1416
# add the local user git config to the vm
@@ -34,6 +36,6 @@ Vagrant.configure(2) do |config|
3436
echo "Starting up middleman at http://localhost:4567"
3537
echo "If it does not come up, check the ~/middleman.log file for any error messages"
3638
cd /vagrant
37-
bundle exec middleman server --force-polling --latency=1 &> ~/middleman.log &
39+
bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
3840
SHELL
39-
end
41+
end

config.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unique header generation
2+
require './lib/unique_head.rb'
3+
14
# Markdown
25
set :markdown_engine, :redcarpet
36
set :markdown,
@@ -7,7 +10,8 @@
710
prettify: true,
811
tables: true,
912
with_toc_data: true,
10-
no_intra_emphasis: true
13+
no_intra_emphasis: true,
14+
renderer: UniqueHeadCounter
1115

1216
# Assets
1317
set :css_dir, 'stylesheets'
@@ -47,3 +51,7 @@
4751
# Deploy Configuration
4852
# If you want Middleman to listen on a different port, you can set that below
4953
set :port, 4567
54+
55+
helpers do
56+
require './lib/toc_data.rb'
57+
end

0 commit comments

Comments
 (0)