Skip to content
This repository was archived by the owner on Jul 8, 2020. It is now read-only.

Commit b68ed2d

Browse files
committed
Use 'title/' permalink and add /cookbook/ redirect
* Add redirect for the <https://qunitjs.com/cookbook/> page we have on the old site to the new /intro page. * Use /:title/ instead of /:title for the permalinks so that it matches the old site for compatibility. * Use HTTPS for links where possible. Ref qunitjs/qunitjs.com#151.
1 parent 3ecdae4 commit b68ed2d

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

_config.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
# Welcome to Jekyll!
22
#
3-
# This config file is meant for settings that affect your whole blog, values
4-
# which you are expected to set up once and rarely edit after that. If you find
5-
# yourself editing this file very often, consider using Jekyll's data files
6-
# feature for the data you need to update frequently.
3+
# This config file is meant for settings that affect your whole site.
4+
# These values are expected to rarely change. If you are editing this file
5+
# very often, consider using Jekyll's data files feature.
76
#
87
# For technical reasons, this file is *NOT* reloaded automatically when you use
98
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
109

11-
# Site settings
12-
# These are used to personalize your new site. If you look in the HTML files,
13-
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
14-
# You can create any custom variable you would like, and they will be accessible
15-
# in the templates via {{ site.myvariable }}.
10+
## Site settings
11+
## https://jekyllrb.com/docs/configuration/
12+
1613
title: QUnit
17-
18-
description: > # this means to ignore newlines until "baseurl:"
19-
The powerful, easy-to-use JavaScript testing framework
20-
baseurl: "" # the subpath of your site, e.g. /blog
21-
url: "https://qunitjs.com" # the base hostname & protocol for your site, e.g. http://example.com
14+
description: The powerful, easy-to-use JavaScript testing framework
15+
# the base hostname and protocol for your site
16+
url: "https://qunitjs.com"
17+
# the subpath of your site, e.g. /blog
18+
baseurl: ""
19+
20+
plugins:
21+
# https://help.github.com/articles/redirects-on-github-pages/
22+
- jekyll-redirect-from
23+
24+
# Theme
2225
twitter_username: qunitjs
2326
github_username: qunitjs
2427

28+
# Conversion
2529
highlighter: rouge
2630
markdown: kramdown
2731
kramdown:
@@ -33,6 +37,7 @@ algolia: # Search
3337
index_name: qunitjs
3438
search_only_api_key: aed00982db05bd21dd05310be057bda8
3539

40+
# Input files
3641
exclude:
3742
- Gemfile
3843
- Gemfile.lock
@@ -41,4 +46,5 @@ exclude:
4146
- CNAME
4247
- vendor
4348

44-
permalink: title
49+
# Output
50+
permalink: title/

intro.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
layout: page
33
title: Getting Started
4+
redirect_from:
5+
- "/cookbook/"
46
---
57

68
<p class="lead" markdown="1">The following guide will get you up-and-running with QUnit in either [Node](#in-node) or [the Browser](#in-the-browser) in just a few minutes.</p>

upgrade-guide-2.x.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ QUnit 2.0.x will include a migration layer that throws descriptive errors for al
1515

1616
## Removed globals
1717

18-
QUnit no longer exposes multiple global variables. The only global variable still exposed is `QUnit`. Use [`QUnit.module()`](http://api.qunitjs.com/QUnit.module/) and [`QUnit.test()`](http://api.qunitjs.com/QUnit.test/) to define your test suite, and use the [`assert`](http://api.qunitjs.com/QUnit.assert/) argument in test callbacks to write assertions.
18+
QUnit no longer exposes multiple global variables. The only global variable still exposed is `QUnit`. Use [`QUnit.module()`](https://api.qunitjs.com/QUnit.module/) and [`QUnit.test()`](https://api.qunitjs.com/QUnit.test/) to define your test suite, and use the [`assert`](https://api.qunitjs.com/QUnit.assert/) argument in test callbacks to write assertions.
1919

20-
The global `stop()` and `start()` methods are gone, replaced by [`assert.async()`](http://api.qunitjs.com/async/), which returns a callback. Execute this callback when your test is done.
20+
The global `stop()` and `start()` methods are gone, replaced by [`assert.async()`](https://api.qunitjs.com/async/), which returns a callback. Execute this callback when your test is done.
2121

2222
### Replace `module()` with `QUnit.module()`
2323

24-
The global function `module()` is gone. Use [`QUnit.module()`](http://api.qunitjs.com/QUnit.module/) instead.
24+
The global function `module()` is gone. Use [`QUnit.module()`](https://api.qunitjs.com/QUnit.module/) instead.
2525

2626
Before:
2727

@@ -37,7 +37,7 @@ QUnit.module( "router" );
3737

3838
### Replace `test()` with `QUnit.test()`
3939

40-
The global function `test()` is gone. Use [`QUnit.test()`](http://api.qunitjs.com/QUnit.test/) instead.
40+
The global function `test()` is gone. Use [`QUnit.test()`](https://api.qunitjs.com/QUnit.test/) instead.
4141

4242
Before:
4343

@@ -53,7 +53,7 @@ QUnit.test( "defaults to home" );
5353

5454
### Replace `stop()` and `start()` with `assert.async()`
5555

56-
The global functions `stop()` and `start()` are gone. Use [`assert.async()`](http://api.qunitjs.com/async/) instead, which returns a "done" function that should be called when the asynchronous operation has completed.
56+
The global functions `stop()` and `start()` are gone. Use [`assert.async()`](https://api.qunitjs.com/async/) instead, which returns a "done" function that should be called when the asynchronous operation has completed.
5757

5858
Before:
5959

@@ -81,7 +81,7 @@ QUnit.test( "navigates to new page (async)", function( assert ) {
8181

8282
### Replace `asyncTest()` with `QUnit.test()` and `assert.async()`
8383

84-
The global function `asyncTest()` is gone. Use [`QUnit.test()`](http://api.qunitjs.com/QUnit.test/) and [`assert.async()`](http://api.qunitjs.com/async/) instead.
84+
The global function `asyncTest()` is gone. Use [`QUnit.test()`](https://api.qunitjs.com/QUnit.test/) and [`assert.async()`](https://api.qunitjs.com/async/) instead.
8585

8686
Before:
8787

@@ -108,7 +108,7 @@ QUnit.test( "navigates to new page (async)", function( assert ) {
108108

109109
### Replace `expect()` with `assert.expect()`
110110

111-
The global function `expect()` is gone. Use [`assert.expect()`](http://api.qunitjs.com/expect/) instead.
111+
The global function `expect()` is gone. Use [`assert.expect()`](https://api.qunitjs.com/expect/) instead.
112112

113113
Before:
114114

@@ -134,9 +134,9 @@ QUnit.test( "refresh (sync)", function( assert ) {
134134

135135
### Replace global assertions with `assert` arguments
136136

137-
All global assertions, like `equal()` and `deepEqual()` are gone. Use `assert` instead, like [`assert.equal()`](http://api.qunitjs.com/equal/) or [`assert.deepEqual()`](http://api.qunitjs.com/deepEqual/).
137+
All global assertions, like `equal()` and `deepEqual()` are gone. Use `assert` instead, like [`assert.equal()`](https://api.qunitjs.com/equal/) or [`assert.deepEqual()`](https://api.qunitjs.com/deepEqual/).
138138

139-
Here are all assertion methods affected by this change in alphabetic order: [`deepEqual()`](http://api.qunitjs.com/deepEqual/), [`equal()`](http://api.qunitjs.com/equal/), [`notDeepEqual()`](http://api.qunitjs.com/notDeepEqual/), [`notEqual()`](http://api.qunitjs.com/notEqual/), [`notPropEqual()`](http://api.qunitjs.com/notPropEqual/), [`notStrictEqual()`](http://api.qunitjs.com/notStrictEqual/), [`ok()`](http://api.qunitjs.com/ok/), [`propEqual()`](http://api.qunitjs.com/propEqual/), [`strictEqual()`](http://api.qunitjs.com/strictEqual/), and [`throws()`](http://api.qunitjs.com/throws/).
139+
Here are all assertion methods affected by this change in alphabetic order: [`deepEqual()`](https://api.qunitjs.com/deepEqual/), [`equal()`](https://api.qunitjs.com/equal/), [`notDeepEqual()`](https://api.qunitjs.com/notDeepEqual/), [`notEqual()`](https://api.qunitjs.com/notEqual/), [`notPropEqual()`](https://api.qunitjs.com/notPropEqual/), [`notStrictEqual()`](https://api.qunitjs.com/notStrictEqual/), [`ok()`](https://api.qunitjs.com/ok/), [`propEqual()`](https://api.qunitjs.com/propEqual/), [`strictEqual()`](https://api.qunitjs.com/strictEqual/), and [`throws()`](https://api.qunitjs.com/throws/).
140140

141141
Before:
142142

@@ -167,7 +167,7 @@ QUnit.test( "static properties", function( assert ) {
167167

168168
## Rename module hooks
169169

170-
The [module hooks](http://api.qunitjs.com/QUnit.module/) `setup` and `teardown` have been renamed to `beforeEach` and `afterEach`, to make it more obvious that they run for each test within a module.
170+
The [module hooks](https://api.qunitjs.com/QUnit.module/) `setup` and `teardown` have been renamed to `beforeEach` and `afterEach`, to make it more obvious that they run for each test within a module.
171171

172172
Before:
173173

@@ -203,7 +203,7 @@ A few methods and properties in the `QUnit` namespace have been modified or remo
203203

204204
For several versions of QUnit before 2.0, custom reporters could be registered by calling the appropriate methods with a callback function. If your code still uses the old approach of overwriting a property on the `QUnit` object, replace that by calling the method instead.
205205

206-
This applies to all reporting callbacks, specifically: [`begin`](http://api.qunitjs.com/QUnit.begin/), [`done`](http://api.qunitjs.com/QUnit.done/), [`log`](http://api.qunitjs.com/QUnit.log/), [`moduleDone`](http://api.qunitjs.com/QUnit.moduleDone/), [`moduleStart`](http://api.qunitjs.com/QUnit.moduleStart/), [`testDone`](http://api.qunitjs.com/QUnit.testDone/), and [`testStart`](http://api.qunitjs.com/QUnit.testStart/).
206+
This applies to all reporting callbacks, specifically: [`begin`](https://api.qunitjs.com/QUnit.begin/), [`done`](https://api.qunitjs.com/QUnit.done/), [`log`](https://api.qunitjs.com/QUnit.log/), [`moduleDone`](https://api.qunitjs.com/QUnit.moduleDone/), [`moduleStart`](https://api.qunitjs.com/QUnit.moduleStart/), [`testDone`](https://api.qunitjs.com/QUnit.testDone/), and [`testStart`](https://api.qunitjs.com/QUnit.testStart/).
207207

208208
Before:
209209

@@ -283,7 +283,7 @@ QUnit.test( "refresh, after replaceState", function( assert ) {
283283

284284
### Replace `QUnit.jsDump` with `QUnit.dump`
285285

286-
Originally `jsDump` was a standalone library imported into QUnit. It has since evolved further within the library. To reflect that, the property was renamed to [`QUnit.dump.parse`](http://api.qunitjs.com/QUnit.dump.parse/). This should only affect custom reporter code, not regular testsuites.
286+
Originally `jsDump` was a standalone library imported into QUnit. It has since evolved further within the library. To reflect that, the property was renamed to [`QUnit.dump.parse`](https://api.qunitjs.com/QUnit.dump.parse/). This should only affect custom reporter code, not regular testsuites.
287287

288288
Before:
289289

0 commit comments

Comments
 (0)