From 1fa97113d5bace001a321a42b11e3486d35b0dbb Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 23 Jun 2020 01:55:02 +1000 Subject: [PATCH] Use Netlify redirects (#1474) --- .github/workflows/deploy.yml | 10 +++ brew.md | 5 -- commander-js.md | 5 -- css-animation.md | 5 -- css-background.md | 6 -- css-font.md | 5 -- css-selectors.md | 5 -- date.md | 5 -- es2015.md | 5 -- es2016.md | 5 -- es2017.md | 5 -- es2018.md | 5 -- expect.js.md | 5 -- factory_girl.md | 5 -- fetch.md | 5 -- flexbox.md | 5 -- flowtype.md | 5 -- gpg.md | 5 -- gpgconf.md | 5 -- gutom.md | 5 -- handlebars-js.md | 5 -- harvey-js.md | 5 -- immutable-js.md | 5 -- netlify.toml | 108 +++++++++++++++++++++++++++++ package.json.md => package-json.md | 0 zombie.md | 38 ++++++---- 26 files changed, 142 insertions(+), 125 deletions(-) delete mode 100644 brew.md delete mode 100644 commander-js.md delete mode 100644 css-animation.md delete mode 100644 css-background.md delete mode 100644 css-font.md delete mode 100644 css-selectors.md delete mode 100644 date.md delete mode 100644 es2015.md delete mode 100644 es2016.md delete mode 100644 es2017.md delete mode 100644 es2018.md delete mode 100644 expect.js.md delete mode 100644 factory_girl.md delete mode 100644 fetch.md delete mode 100644 flexbox.md delete mode 100644 flowtype.md delete mode 100644 gpg.md delete mode 100644 gpgconf.md delete mode 100644 gutom.md delete mode 100644 handlebars-js.md delete mode 100644 harvey-js.md delete mode 100644 immutable-js.md rename package.json.md => package-json.md (100%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 891c4de1a..f7e871505 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,6 +9,16 @@ jobs: runs-on: ubuntu-latest steps: + - name: "Notes (read me) 📖" + run: | + # About this workflow + # ------------------- + # + # This workflow generates GitHub pages, but IT IS NOT USED. It is + # only generated as an emergency fallback in case Netlify goes down. + # + # 😊 + - uses: actions/checkout@v2 with: persist-credentials: false diff --git a/brew.md b/brew.md deleted file mode 100644 index 0db9189b2..000000000 --- a/brew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Homebrew -category: Hidden -redirect_to: /homebrew ---- diff --git a/commander-js.md b/commander-js.md deleted file mode 100644 index 1f749c2e9..000000000 --- a/commander-js.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Commander.js -category: Hidden -redirect_to: /commander.js ---- diff --git a/css-animation.md b/css-animation.md deleted file mode 100644 index 5a8e9a9bb..000000000 --- a/css-animation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: CSS animations -category: Hidden -redirect_to: /css#animation ---- diff --git a/css-background.md b/css-background.md deleted file mode 100644 index ed291c73d..000000000 --- a/css-background.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: CSS background -category: Hidden -redirect_to: /css#background ---- - diff --git a/css-font.md b/css-font.md deleted file mode 100644 index db037f67a..000000000 --- a/css-font.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: CSS font -category: Hidden -redirect_to: /css#fonts ---- diff --git a/css-selectors.md b/css-selectors.md deleted file mode 100644 index 2394b1a7e..000000000 --- a/css-selectors.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: CSS selectors -category: Hidden -redirect_to: /css#selectors ---- diff --git a/date.md b/date.md deleted file mode 100644 index 5e110a168..000000000 --- a/date.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Date -categoroy: Hidden -redirect_to: /datetime ---- diff --git a/es2015.md b/es2015.md deleted file mode 100644 index 9ed33e134..000000000 --- a/es2015.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: ES2015 -category: JavaScript -redirect_to: /es6 ---- diff --git a/es2016.md b/es2016.md deleted file mode 100644 index 0bf29b4bb..000000000 --- a/es2016.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: ES2016 -category: JavaScript -redirect_to: /es6 ---- diff --git a/es2017.md b/es2017.md deleted file mode 100644 index 6cd6e7bf3..000000000 --- a/es2017.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: ES2017 -category: JavaScript -redirect_to: /es6 ---- diff --git a/es2018.md b/es2018.md deleted file mode 100644 index 870a84730..000000000 --- a/es2018.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: ES2018 -category: JavaScript -redirect_to: /es6 ---- diff --git a/expect.js.md b/expect.js.md deleted file mode 100644 index ec0c4f936..000000000 --- a/expect.js.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: expect.js -category: Hidden -redirect_to: /expectjs ---- diff --git a/factory_girl.md b/factory_girl.md deleted file mode 100644 index eb14b932b..000000000 --- a/factory_girl.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Factory Girl -category: Ruby libraries -redirect_to: /factory_bot ---- diff --git a/fetch.md b/fetch.md deleted file mode 100644 index b7c189bdb..000000000 --- a/fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: fetch() -category: Hidden -redirect_to: /js-fetch ---- diff --git a/flexbox.md b/flexbox.md deleted file mode 100644 index 11f31ab71..000000000 --- a/flexbox.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Flexbox -category: Hidden -redirect_to: /css-flexbox ---- diff --git a/flowtype.md b/flowtype.md deleted file mode 100644 index 0ccea45e3..000000000 --- a/flowtype.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Flow -redirect_to: /flow -category: JavaScript libraries ---- diff --git a/gpg.md b/gpg.md deleted file mode 100644 index 0582f3df6..000000000 --- a/gpg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: GPG -category: Hidden -redirect_to: /gnupg ---- diff --git a/gpgconf.md b/gpgconf.md deleted file mode 100644 index 7537956fb..000000000 --- a/gpgconf.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: gpgconf -category: Hidden -redirect_to: /gnupg ---- diff --git a/gutom.md b/gutom.md deleted file mode 100644 index 1274f5c5e..000000000 --- a/gutom.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Gutom -category: Hidden -redirect_to: /ph-food-delivery ---- diff --git a/handlebars-js.md b/handlebars-js.md deleted file mode 100644 index 73158ae79..000000000 --- a/handlebars-js.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Handlebars.js -category: Hidden -redirect_to: /handlebars.js ---- diff --git a/harvey-js.md b/harvey-js.md deleted file mode 100644 index b0a4dfdbc..000000000 --- a/harvey-js.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Harvey.js -category: Hidden -redirect_to: /harvey.js ---- diff --git a/immutable-js.md b/immutable-js.md deleted file mode 100644 index 2ae8ece7d..000000000 --- a/immutable-js.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Immutable.js -category: Hidden -redirect_to: /immutable.js ---- diff --git a/netlify.toml b/netlify.toml index 6d719fd80..eecc17381 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,111 @@ [build] command = "yarn build" publish = "_site/" + +[[redirects]] +from = "/flexbox" +to = "/css-flexbox" + +[[redirects]] +from = "/flowtype" +to = "/flow" + +[[redirects]] +from = "/gpgconf" +to = "/gnupg" + +[[redirects]] +from = "/gpg" +to = "/gnupg" + +[[redirects]] +from = "/gutom" +to = "/ph-food-delivery" + +[[redirects]] +from = "/handlebars-js" +to = "/handlebars.js" + +[[redirects]] +from = "/harvey-js" +to = "/harvey.js" + +[[redirects]] +from = "/immutable-js" +to = "/immutable.js" + +[[redirects]] +from = "/jade" +to = "/pug" + +[[redirects]] +from = "/package" +to = "/package-json" + +[[redirects]] +from = "/package.json" +to = "/package-json" + +[[redirects]] +from = "/phoenix-ecto@1.3" +to = "/phoenix-ecto" + +[[redirects]] +from = "/sh" +to = "/bash" + +[[redirects]] +from = "/commander-js" +to = "/commander.js" + +[[redirects]] +from = "/es2015" +to = "/es6" + +[[redirects]] +from = "/es2016" +to = "/es6" + +[[redirects]] +from = "/es2017" +to = "/es6" + +[[redirects]] +from = "/es2018" +to = "/es6" + +[[redirects]] +from = "/expect.js" +to = "/expectjs" + +[[redirects]] +from = "/factory_girl" +to = "/factory_bot" + +[[redirects]] +from = "/css-animation" +to = "/css#animation" + +[[redirects]] +from = "/css-background" +to = "/css#background" + +[[redirects]] +from = "/css-font" +to = "/css#fonts" + +[[redirects]] +from = "/css-selectors" +to = "/css#selectors" + +[[redirects]] +from = "/brew" +to = "/homebrew" + +[[redirects]] +from = "/date" +to = "/datetime" + +[[redirects]] +from = "/fetch" +to = "/js-fetch" diff --git a/package.json.md b/package-json.md similarity index 100% rename from package.json.md rename to package-json.md diff --git a/zombie.md b/zombie.md index 29b6a2197..aaf1895bf 100644 --- a/zombie.md +++ b/zombie.md @@ -1,26 +1,36 @@ --- title: Zombie category: JavaScript libraries +layout: 2017/sheet +intro: | + [Zombie](http://zombie.js.org/) is a full-stack testing solution for Node.js. --- +## Zombie - browser - .visit("http://.../", ->) - .fill("email", "zombie@underworld.dead") - .fill("password", "eat-the-living") - .select("Born", "1985") - .uncheck("Send newsletter") - .clickLink("Link name") - .pressButton("Sign", -> ...) +### Examples - .text("H1") +```js +browser + .visit("http://.../", ->) + .fill("email", "zombie@underworld.dead") + .fill("password", "eat-the-living") + .select("Born", "1985") + .uncheck("Send newsletter") + .clickLink("Link name") + .pressButton("Sign", () => { ... }) + .text("H1") +``` +### Expectations - expect(browser.query("#brains")) +```js +expect(browser.query("#brains")) - expect(browser.body.queryAll(".hand")).length 2 +expect(browser.body.queryAll(".hand")).length 2 - console.log(browser.html()) - console.log(browser.html("table.parts")) +console.log(browser.html()) +console.log(browser.html("table.parts")) - expect(Browser.text(".card-nopad small"), "A better way to get around!") +expect(Browser.text(".card-nopad small"), "A better way to get around!") +```