diff --git a/test/__fixtures__/custom-website/pages/bar/baz.js b/test/__fixtures__/custom-site/pages/bar/baz.js similarity index 100% rename from test/__fixtures__/custom-website/pages/bar/baz.js rename to test/__fixtures__/custom-site/pages/bar/baz.js diff --git a/test/__fixtures__/custom-website/pages/foo.js b/test/__fixtures__/custom-site/pages/foo.js similarity index 100% rename from test/__fixtures__/custom-website/pages/foo.js rename to test/__fixtures__/custom-site/pages/foo.js diff --git a/test/__fixtures__/custom-website/pages/foo/index.js b/test/__fixtures__/custom-site/pages/foo/index.js similarity index 100% rename from test/__fixtures__/custom-website/pages/foo/index.js rename to test/__fixtures__/custom-site/pages/foo/index.js diff --git a/test/__fixtures__/custom-website/pages/index.js b/test/__fixtures__/custom-site/pages/index.js similarity index 100% rename from test/__fixtures__/custom-website/pages/index.js rename to test/__fixtures__/custom-site/pages/index.js diff --git a/test/__fixtures__/custom-website/siteConfig.js b/test/__fixtures__/custom-site/siteConfig.js similarity index 100% rename from test/__fixtures__/custom-website/siteConfig.js rename to test/__fixtures__/custom-site/siteConfig.js diff --git a/test/__fixtures__/docs/foo/baz.md b/test/__fixtures__/docs/foo/baz.md index add729c51d..75e9149616 100644 --- a/test/__fixtures__/docs/foo/baz.md +++ b/test/__fixtures__/docs/foo/baz.md @@ -5,9 +5,6 @@ title: baz ## Images -![Minion](/img/minion.png) -![Stormtroopocat](/img/stormtroopocat.jpg) - Like links, Images also have a footnote style syntax ![Alt text][id] diff --git a/test/__fixtures__/simple-site/pages/hello/world.js b/test/__fixtures__/simple-site/pages/hello/world.js new file mode 100644 index 0000000000..838f36bb1a --- /dev/null +++ b/test/__fixtures__/simple-site/pages/hello/world.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class World extends React.Component { + render() { + return ( + + + World + + +
Hello World
+
+ ); + } +} diff --git a/test/__fixtures__/simple-site/pages/index.js b/test/__fixtures__/simple-site/pages/index.js new file mode 100644 index 0000000000..58dd9accb1 --- /dev/null +++ b/test/__fixtures__/simple-site/pages/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class Home extends React.Component { + render() { + return ( + + + Home + + +
Home ...
+
+ ); + } +} diff --git a/test/__fixtures__/simple-site/sidebars.json b/test/__fixtures__/simple-site/sidebars.json new file mode 100644 index 0000000000..49667e47b5 --- /dev/null +++ b/test/__fixtures__/simple-site/sidebars.json @@ -0,0 +1,10 @@ +{ + "docs": { + "Getting Started": [ + "installation" + ], + "Guides": [ + "blog" + ] + } +} diff --git a/test/__fixtures__/simple-website/siteConfig.js b/test/__fixtures__/simple-site/siteConfig.js similarity index 100% rename from test/__fixtures__/simple-website/siteConfig.js rename to test/__fixtures__/simple-site/siteConfig.js diff --git a/test/__fixtures__/simple-site/static/css/basic.css b/test/__fixtures__/simple-site/static/css/basic.css new file mode 100644 index 0000000000..e6e089cbfa --- /dev/null +++ b/test/__fixtures__/simple-site/static/css/basic.css @@ -0,0 +1,378 @@ +html, +body { + margin: 0; + padding: 0; +} + +button { + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 100%; + vertical-align: baseline; + font-family: inherit; + font-weight: inherit; + color: inherit; + -webkit-appearance: none; + appearance: none; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +body { + font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.4em; + background: #f5f5f5; + color: #4d4d4d; + min-width: 230px; + max-width: 550px; + margin: 0 auto; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; + font-weight: 300; +} + +button, +input[type="checkbox"] { + outline: none; +} + +.hidden { + display: none; +} + +.todoapp { + background: #fff; + margin: 130px 0 40px 0; + position: relative; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 25px 50px 0 rgba(0, 0, 0, 0.1); +} + +.todoapp input::-webkit-input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::-moz-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp h1 { + position: absolute; + top: -155px; + width: 100%; + font-size: 100px; + font-weight: 100; + text-align: center; + color: rgba(175, 47, 47, 0.15); + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; +} + +.new-todo, +.edit { + position: relative; + margin: 0; + width: 100%; + font-size: 24px; + font-family: inherit; + font-weight: inherit; + line-height: 1.4em; + border: 0; + outline: none; + color: inherit; + padding: 6px; + border: 1px solid #999; + box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +.new-todo { + padding: 16px 16px 16px 60px; + border: none; + background: rgba(0, 0, 0, 0.003); + box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); +} + +.main { + position: relative; + z-index: 2; + border-top: 1px solid #e6e6e6; +} + +label[for='toggle-all'] { + display: none; +} + +.toggle-all { + position: absolute; + top: -55px; + left: -12px; + width: 60px; + height: 34px; + text-align: center; + border: none; /* Mobile Safari */ +} + +.toggle-all:before { + content: '❯'; + font-size: 22px; + color: #e6e6e6; + padding: 10px 27px 10px 27px; +} + +.toggle-all:checked:before { + color: #737373; +} + +.todo-list { + margin: 0; + padding: 0; + list-style: none; +} + +.todo-list li { + position: relative; + font-size: 24px; + border-bottom: 1px solid #ededed; +} + +.todo-list li:last-child { + border-bottom: none; +} + +.todo-list li.editing { + border-bottom: none; + padding: 0; +} + +.todo-list li.editing .edit { + display: block; + width: 506px; + padding: 13px 17px 12px 17px; + margin: 0 0 0 43px; +} + +.todo-list li.editing .view { + display: none; +} + +.todo-list li .toggle { + text-align: center; + width: 40px; + /* auto, since non-WebKit browsers doesn't support input styling */ + height: auto; + position: absolute; + top: 0; + bottom: 0; + margin: auto 0; + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} + +.todo-list li .toggle:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li .toggle:checked:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li label { + white-space: pre-line; + word-break: break-all; + padding: 15px 60px 15px 15px; + margin-left: 45px; + display: block; + line-height: 1.2; + transition: color 0.4s; +} + +.todo-list li.completed label { + color: #d9d9d9; + text-decoration: line-through; +} + +.todo-list li .destroy { + display: none; + position: absolute; + top: 0; + right: 10px; + bottom: 0; + width: 40px; + height: 40px; + margin: auto 0; + font-size: 30px; + color: #cc9a9a; + margin-bottom: 11px; + transition: color 0.2s ease-out; +} + +.todo-list li .destroy:hover { + color: #af5b5e; +} + +.todo-list li .destroy:after { + content: '×'; +} + +.todo-list li:hover .destroy { + display: block; +} + +.todo-list li .edit { + display: none; +} + +.todo-list li.editing:last-child { + margin-bottom: -1px; +} + +.footer { + color: #777; + padding: 10px 15px; + height: 20px; + text-align: center; + border-top: 1px solid #e6e6e6; +} + +.footer:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 50px; + overflow: hidden; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), + 0 8px 0 -3px #f6f6f6, + 0 9px 1px -3px rgba(0, 0, 0, 0.2), + 0 16px 0 -6px #f6f6f6, + 0 17px 2px -6px rgba(0, 0, 0, 0.2); +} + +.todo-count { + float: left; + text-align: left; +} + +.todo-count strong { + font-weight: 300; +} + +.filters { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + right: 0; + left: 0; +} + +.filters li { + display: inline; +} + +.filters li a { + color: inherit; + margin: 3px; + padding: 3px 7px; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} + +.filters li a.selected, +.filters li a:hover { + border-color: rgba(175, 47, 47, 0.1); +} + +.filters li a.selected { + border-color: rgba(175, 47, 47, 0.2); +} + +.clear-completed, +html .clear-completed:active { + float: right; + position: relative; + line-height: 20px; + text-decoration: none; + cursor: pointer; + position: relative; +} + +.clear-completed:hover { + text-decoration: underline; +} + +.info { + margin: 65px auto 0; + color: #bfbfbf; + font-size: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-align: center; +} + +.info p { + line-height: 1; +} + +.info a { + color: inherit; + text-decoration: none; + font-weight: 400; +} + +.info a:hover { + text-decoration: underline; +} + +/* + Hack to remove background from Mobile Safari. + Can't use it globally since it destroys checkboxes in Firefox +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + .toggle-all, + .todo-list li .toggle { + background: none; + } + + .todo-list li .toggle { + height: 40px; + } + + .toggle-all { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-appearance: none; + appearance: none; + } +} + +@media (max-width: 430px) { + .footer { + height: 50px; + } + + .filters { + bottom: 10px; + } +} diff --git a/test/__fixtures__/simple-site/static/img/sakura.png b/test/__fixtures__/simple-site/static/img/sakura.png new file mode 100644 index 0000000000..e10909398b Binary files /dev/null and b/test/__fixtures__/simple-site/static/img/sakura.png differ diff --git a/test/__fixtures__/simple-site/static/img/slash-introducing.png b/test/__fixtures__/simple-site/static/img/slash-introducing.png new file mode 100644 index 0000000000..8394578868 Binary files /dev/null and b/test/__fixtures__/simple-site/static/img/slash-introducing.png differ diff --git a/test/__fixtures__/simple-website/pages/bar/baz.js b/test/__fixtures__/simple-website/pages/bar/baz.js deleted file mode 100644 index 75a8c70015..0000000000 --- a/test/__fixtures__/simple-website/pages/bar/baz.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export default () =>
Baz
; diff --git a/test/__fixtures__/simple-website/pages/foo.js b/test/__fixtures__/simple-website/pages/foo.js deleted file mode 100644 index 3b52ec615c..0000000000 --- a/test/__fixtures__/simple-website/pages/foo.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export default () =>
Foo
; diff --git a/test/__fixtures__/simple-website/pages/foo/index.js b/test/__fixtures__/simple-website/pages/foo/index.js deleted file mode 100644 index 5faf67ae13..0000000000 --- a/test/__fixtures__/simple-website/pages/foo/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export default () =>
Foo in subfolder
; diff --git a/test/__fixtures__/simple-website/pages/index.js b/test/__fixtures__/simple-website/pages/index.js deleted file mode 100644 index 13063810a7..0000000000 --- a/test/__fixtures__/simple-website/pages/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export default () =>
Index
; diff --git a/test/__fixtures__/translated-site/languages.js b/test/__fixtures__/translated-site/languages.js new file mode 100644 index 0000000000..d7e55bf050 --- /dev/null +++ b/test/__fixtures__/translated-site/languages.js @@ -0,0 +1,178 @@ +const languages = [ + { + enabled: true, + name: 'English', + tag: 'en', + }, + { + enabled: false, + name: '日本語', + tag: 'ja', + }, + { + enabled: false, + name: 'العربية', + tag: 'ar', + }, + { + enabled: false, + name: 'Bosanski', + tag: 'bs-BA', + }, + { + enabled: false, + name: 'Català', + tag: 'ca', + }, + { + enabled: false, + name: 'Čeština', + tag: 'cs', + }, + { + enabled: false, + name: 'Dansk', + tag: 'da', + }, + { + enabled: false, + name: 'Deutsch', + tag: 'de', + }, + { + enabled: false, + name: 'Ελληνικά', + tag: 'el', + }, + { + enabled: false, + name: 'Español', + tag: 'es-ES', + }, + { + enabled: false, + name: 'فارسی', + tag: 'fa-IR', + }, + { + enabled: false, + name: 'Suomi', + tag: 'fi', + }, + { + enabled: false, + name: 'Français', + tag: 'fr', + }, + { + enabled: false, + name: 'עִברִית', + tag: 'he', + }, + { + enabled: false, + name: 'Magyar', + tag: 'hu', + }, + { + enabled: false, + name: 'Bahasa Indonesia', + tag: 'id-ID', + }, + { + enabled: false, + name: 'Italiano', + tag: 'it', + }, + { + enabled: false, + name: 'Afrikaans', + tag: 'af', + }, + { + enabled: true, + name: '한국어', + tag: 'ko', + }, + { + enabled: false, + name: 'मराठी', + tag: 'mr-IN', + }, + { + enabled: false, + name: 'Nederlands', + tag: 'nl', + }, + { + enabled: false, + name: 'Norsk', + tag: 'no-NO', + }, + { + enabled: false, + name: 'Polskie', + tag: 'pl', + }, + { + enabled: false, + name: 'Português', + tag: 'pt-PT', + }, + { + enabled: false, + name: 'Português (Brasil)', + tag: 'pt-BR', + }, + { + enabled: false, + name: 'Română', + tag: 'ro', + }, + { + enabled: false, + name: 'Русский', + tag: 'ru', + }, + { + enabled: false, + name: 'Slovenský', + tag: 'sk-SK', + }, + { + enabled: false, + name: 'Српски језик (Ћирилица)', + tag: 'sr', + }, + { + enabled: false, + name: 'Svenska', + tag: 'sv-SE', + }, + { + enabled: false, + name: 'Türkçe', + tag: 'tr', + }, + { + enabled: false, + name: 'Українська', + tag: 'uk', + }, + { + enabled: false, + name: 'Tiếng Việt', + tag: 'vi', + }, + { + enabled: false, + name: '简体中文', + tag: 'zh-CN', + }, + { + enabled: false, + name: '繁體中文', + tag: 'zh-TW', + }, +]; +module.exports = languages; diff --git a/test/__fixtures__/translated-site/pages/hello/world.js b/test/__fixtures__/translated-site/pages/hello/world.js new file mode 100644 index 0000000000..838f36bb1a --- /dev/null +++ b/test/__fixtures__/translated-site/pages/hello/world.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class World extends React.Component { + render() { + return ( + + + World + + +
Hello World
+
+ ); + } +} diff --git a/test/__fixtures__/translated-site/pages/index.js b/test/__fixtures__/translated-site/pages/index.js new file mode 100644 index 0000000000..58dd9accb1 --- /dev/null +++ b/test/__fixtures__/translated-site/pages/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class Home extends React.Component { + render() { + return ( + + + Home + + +
Home ...
+
+ ); + } +} diff --git a/test/__fixtures__/translated-site/siteConfig.js b/test/__fixtures__/translated-site/siteConfig.js new file mode 100644 index 0000000000..661f59c981 --- /dev/null +++ b/test/__fixtures__/translated-site/siteConfig.js @@ -0,0 +1,8 @@ +module.exports = { + title: 'Hello', + tagline: 'Hello World', + organizationName: 'endiliey', + projectName: 'hello', + baseUrl: '/', + defaultLanguage: 'en' +}; diff --git a/test/__fixtures__/translated-site/static/css/basic.css b/test/__fixtures__/translated-site/static/css/basic.css new file mode 100644 index 0000000000..e6e089cbfa --- /dev/null +++ b/test/__fixtures__/translated-site/static/css/basic.css @@ -0,0 +1,378 @@ +html, +body { + margin: 0; + padding: 0; +} + +button { + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 100%; + vertical-align: baseline; + font-family: inherit; + font-weight: inherit; + color: inherit; + -webkit-appearance: none; + appearance: none; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +body { + font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.4em; + background: #f5f5f5; + color: #4d4d4d; + min-width: 230px; + max-width: 550px; + margin: 0 auto; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; + font-weight: 300; +} + +button, +input[type="checkbox"] { + outline: none; +} + +.hidden { + display: none; +} + +.todoapp { + background: #fff; + margin: 130px 0 40px 0; + position: relative; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 25px 50px 0 rgba(0, 0, 0, 0.1); +} + +.todoapp input::-webkit-input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::-moz-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp h1 { + position: absolute; + top: -155px; + width: 100%; + font-size: 100px; + font-weight: 100; + text-align: center; + color: rgba(175, 47, 47, 0.15); + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; +} + +.new-todo, +.edit { + position: relative; + margin: 0; + width: 100%; + font-size: 24px; + font-family: inherit; + font-weight: inherit; + line-height: 1.4em; + border: 0; + outline: none; + color: inherit; + padding: 6px; + border: 1px solid #999; + box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +.new-todo { + padding: 16px 16px 16px 60px; + border: none; + background: rgba(0, 0, 0, 0.003); + box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); +} + +.main { + position: relative; + z-index: 2; + border-top: 1px solid #e6e6e6; +} + +label[for='toggle-all'] { + display: none; +} + +.toggle-all { + position: absolute; + top: -55px; + left: -12px; + width: 60px; + height: 34px; + text-align: center; + border: none; /* Mobile Safari */ +} + +.toggle-all:before { + content: '❯'; + font-size: 22px; + color: #e6e6e6; + padding: 10px 27px 10px 27px; +} + +.toggle-all:checked:before { + color: #737373; +} + +.todo-list { + margin: 0; + padding: 0; + list-style: none; +} + +.todo-list li { + position: relative; + font-size: 24px; + border-bottom: 1px solid #ededed; +} + +.todo-list li:last-child { + border-bottom: none; +} + +.todo-list li.editing { + border-bottom: none; + padding: 0; +} + +.todo-list li.editing .edit { + display: block; + width: 506px; + padding: 13px 17px 12px 17px; + margin: 0 0 0 43px; +} + +.todo-list li.editing .view { + display: none; +} + +.todo-list li .toggle { + text-align: center; + width: 40px; + /* auto, since non-WebKit browsers doesn't support input styling */ + height: auto; + position: absolute; + top: 0; + bottom: 0; + margin: auto 0; + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} + +.todo-list li .toggle:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li .toggle:checked:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li label { + white-space: pre-line; + word-break: break-all; + padding: 15px 60px 15px 15px; + margin-left: 45px; + display: block; + line-height: 1.2; + transition: color 0.4s; +} + +.todo-list li.completed label { + color: #d9d9d9; + text-decoration: line-through; +} + +.todo-list li .destroy { + display: none; + position: absolute; + top: 0; + right: 10px; + bottom: 0; + width: 40px; + height: 40px; + margin: auto 0; + font-size: 30px; + color: #cc9a9a; + margin-bottom: 11px; + transition: color 0.2s ease-out; +} + +.todo-list li .destroy:hover { + color: #af5b5e; +} + +.todo-list li .destroy:after { + content: '×'; +} + +.todo-list li:hover .destroy { + display: block; +} + +.todo-list li .edit { + display: none; +} + +.todo-list li.editing:last-child { + margin-bottom: -1px; +} + +.footer { + color: #777; + padding: 10px 15px; + height: 20px; + text-align: center; + border-top: 1px solid #e6e6e6; +} + +.footer:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 50px; + overflow: hidden; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), + 0 8px 0 -3px #f6f6f6, + 0 9px 1px -3px rgba(0, 0, 0, 0.2), + 0 16px 0 -6px #f6f6f6, + 0 17px 2px -6px rgba(0, 0, 0, 0.2); +} + +.todo-count { + float: left; + text-align: left; +} + +.todo-count strong { + font-weight: 300; +} + +.filters { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + right: 0; + left: 0; +} + +.filters li { + display: inline; +} + +.filters li a { + color: inherit; + margin: 3px; + padding: 3px 7px; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} + +.filters li a.selected, +.filters li a:hover { + border-color: rgba(175, 47, 47, 0.1); +} + +.filters li a.selected { + border-color: rgba(175, 47, 47, 0.2); +} + +.clear-completed, +html .clear-completed:active { + float: right; + position: relative; + line-height: 20px; + text-decoration: none; + cursor: pointer; + position: relative; +} + +.clear-completed:hover { + text-decoration: underline; +} + +.info { + margin: 65px auto 0; + color: #bfbfbf; + font-size: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-align: center; +} + +.info p { + line-height: 1; +} + +.info a { + color: inherit; + text-decoration: none; + font-weight: 400; +} + +.info a:hover { + text-decoration: underline; +} + +/* + Hack to remove background from Mobile Safari. + Can't use it globally since it destroys checkboxes in Firefox +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + .toggle-all, + .todo-list li .toggle { + background: none; + } + + .todo-list li .toggle { + height: 40px; + } + + .toggle-all { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-appearance: none; + appearance: none; + } +} + +@media (max-width: 430px) { + .footer { + height: 50px; + } + + .filters { + bottom: 10px; + } +} diff --git a/test/__fixtures__/translated-site/static/img/sakura.png b/test/__fixtures__/translated-site/static/img/sakura.png new file mode 100644 index 0000000000..e10909398b Binary files /dev/null and b/test/__fixtures__/translated-site/static/img/sakura.png differ diff --git a/test/__fixtures__/translated-site/static/img/slash-introducing.png b/test/__fixtures__/translated-site/static/img/slash-introducing.png new file mode 100644 index 0000000000..8394578868 Binary files /dev/null and b/test/__fixtures__/translated-site/static/img/slash-introducing.png differ diff --git a/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/bar.md b/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/bar.md new file mode 100644 index 0000000000..a1b031cb23 --- /dev/null +++ b/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: bar +title: Bar +--- + +# Remarkable + +> Remarkable로 실시간 편집을 경험하십시오! + +깨끗한 슬레이트로 시작하려면`clear` 링크를 클릭하고 결과를 공유하거나 저장하려면`permalink`를 가져옵니다. + +*** + +# h1 제목 +## h2 제목 +### h3 제목 +#### h4 헤딩 +##### h5 제목 +###### h6 제목 + + +## 수평 규칙 + +___ + +*** + +*** + + +## 활자체 대체 + +입력기 옵션을 사용하면 결과를 볼 수 있습니다. + +(p) (P) + - (r) (t) + +테스트 .. 테스트 ... 테스트 ..... 테스트? ..... 테스트! .... + +!!!!!! ???? ,, + +놀라운 - 굉장한 + +"Smartypants, 큰 따옴표" + +'Smartypants, 작은 따옴표' + + +## 강조 + +** 이것은 굵은 글씨입니다 ** + +__ 이것은 굵은 글씨입니다 __ + +* 이탤릭체 텍스트 * + +_ 이탤릭체 텍스트 _ + +~~ 삭제 된 텍스트 ~~ + +위 첨자 : 19 ^ th ^ + +아래 첨자 : H ~ 2 ~ O + +++ 삽입 된 텍스트 ++ + +== 표시된 텍스트 == \ No newline at end of file diff --git a/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/baz.md b/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/baz.md new file mode 100644 index 0000000000..c078572ef4 --- /dev/null +++ b/test/__fixtures__/translated-site/translated_docs/ko/docs/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: baz +title: baz +--- + +## 이미지 + +링크와 마찬가지로 이미지에도 각주 스타일 구문이 있습니다. + +! [Alt text] [id] + +나중에 URL 위치를 정의하는 문서에서 참조로 : + +[id] : https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## 링크 + +[링크 텍스트] (http://dev.nodeca.com) + +[제목 링크] (http://nodeca.github.io/pica/demo/ "제목 텍스트!") + +자동 변환 된 링크 https://github.com/nodeca/pica (linkify를 사용하도록 설정) + + + +## 각주 + +각주 1 링크 [^ 첫 번째]. + +각주 2 링크 [^ 초]. + +인라인 각주 ^ [인라인 각주의 텍스트] 정의. + +중복 된 각주 참조 [^ 초]. + +[^ first] : 각주 **는 마크 업을 가질 수 있습니다 ** + +    및 여러 단락. + +[^ 초] : 각주 텍스트. + + +## 정의 목록 + +1 학기 + +정의 1 +게으른 연속. + +* 인라인 마크 업과 함께 2 학기 * + +: 정의 2 + +        {일부 코드, 정의 2의 일부} + +    정의의 세 번째 단락 2. + +_ 컴팩트 스타일 : _ + +1 학기 +  ~ 정의 1 + +2 학기 +  ~ 정의 2a +  ~ 정의 2b + + +## 약어 + +이것은 HTML 약어입니다. + +그것은 "HTML"을 변환하지만 "xxxHTMLyyy"와 같이 부분적인 항목을 그대로 유지합니다. + +* [HTML] : 하이퍼 텍스트 마크 업 언어 \ No newline at end of file diff --git a/test/__fixtures__/translated-site/translated_docs/ko/docs/hello.md b/test/__fixtures__/translated-site/translated_docs/ko/docs/hello.md new file mode 100644 index 0000000000..9c67f37d2e --- /dev/null +++ b/test/__fixtures__/translated-site/translated_docs/ko/docs/hello.md @@ -0,0 +1,40 @@ +--- +id: hello +title: Hello, World ! +--- + +안녕하세요, 여기 엔 틸리에 :) + +## Blockquotes + +> Blockquotes는 또한 중첩 될 수 있습니다 ... +>> ... 서로 옆에 큰 더 큰 부호를 사용하여 ... +>>> ... 또는 화살표 사이에 공백이 있어야합니다. + + +## 목록 + +정렬되지 않은 + ++`+`,`-` 또는`*`를 사용하여 행을 시작하여 목록을 만듭니다. ++ 하위 목록은 2 칸을 들여서 만들어집니다 : +   - 마커 문자 변경으로 새로운 목록 시작 : +     * AC tristique libero volutpat at +     + Preisium nisl aliquet에 대한 + 시설 +     - Nulla volutpat aliquam velit ++ 매우 쉽습니다! + +주문 됨 + +1. Lorem ipsum dolor sit amet +2. 컨소시엄 adipiscing 엘리트 +3. massa에서의 정수 lorem + + +1. 일련 번호를 사용할 수 있습니다 ... +1. ... 또는 모든 숫자를 '1'로 유지하십시오. + +오프셋을 사용하여 번호 매기기 시작 : + +57. foo +1. 막대기 \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/languages.js b/test/__fixtures__/transversioned-site/languages.js new file mode 100644 index 0000000000..d7e55bf050 --- /dev/null +++ b/test/__fixtures__/transversioned-site/languages.js @@ -0,0 +1,178 @@ +const languages = [ + { + enabled: true, + name: 'English', + tag: 'en', + }, + { + enabled: false, + name: '日本語', + tag: 'ja', + }, + { + enabled: false, + name: 'العربية', + tag: 'ar', + }, + { + enabled: false, + name: 'Bosanski', + tag: 'bs-BA', + }, + { + enabled: false, + name: 'Català', + tag: 'ca', + }, + { + enabled: false, + name: 'Čeština', + tag: 'cs', + }, + { + enabled: false, + name: 'Dansk', + tag: 'da', + }, + { + enabled: false, + name: 'Deutsch', + tag: 'de', + }, + { + enabled: false, + name: 'Ελληνικά', + tag: 'el', + }, + { + enabled: false, + name: 'Español', + tag: 'es-ES', + }, + { + enabled: false, + name: 'فارسی', + tag: 'fa-IR', + }, + { + enabled: false, + name: 'Suomi', + tag: 'fi', + }, + { + enabled: false, + name: 'Français', + tag: 'fr', + }, + { + enabled: false, + name: 'עִברִית', + tag: 'he', + }, + { + enabled: false, + name: 'Magyar', + tag: 'hu', + }, + { + enabled: false, + name: 'Bahasa Indonesia', + tag: 'id-ID', + }, + { + enabled: false, + name: 'Italiano', + tag: 'it', + }, + { + enabled: false, + name: 'Afrikaans', + tag: 'af', + }, + { + enabled: true, + name: '한국어', + tag: 'ko', + }, + { + enabled: false, + name: 'मराठी', + tag: 'mr-IN', + }, + { + enabled: false, + name: 'Nederlands', + tag: 'nl', + }, + { + enabled: false, + name: 'Norsk', + tag: 'no-NO', + }, + { + enabled: false, + name: 'Polskie', + tag: 'pl', + }, + { + enabled: false, + name: 'Português', + tag: 'pt-PT', + }, + { + enabled: false, + name: 'Português (Brasil)', + tag: 'pt-BR', + }, + { + enabled: false, + name: 'Română', + tag: 'ro', + }, + { + enabled: false, + name: 'Русский', + tag: 'ru', + }, + { + enabled: false, + name: 'Slovenský', + tag: 'sk-SK', + }, + { + enabled: false, + name: 'Српски језик (Ћирилица)', + tag: 'sr', + }, + { + enabled: false, + name: 'Svenska', + tag: 'sv-SE', + }, + { + enabled: false, + name: 'Türkçe', + tag: 'tr', + }, + { + enabled: false, + name: 'Українська', + tag: 'uk', + }, + { + enabled: false, + name: 'Tiếng Việt', + tag: 'vi', + }, + { + enabled: false, + name: '简体中文', + tag: 'zh-CN', + }, + { + enabled: false, + name: '繁體中文', + tag: 'zh-TW', + }, +]; +module.exports = languages; diff --git a/test/__fixtures__/transversioned-site/pages/hello/world.js b/test/__fixtures__/transversioned-site/pages/hello/world.js new file mode 100644 index 0000000000..838f36bb1a --- /dev/null +++ b/test/__fixtures__/transversioned-site/pages/hello/world.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class World extends React.Component { + render() { + return ( + + + World + + +
Hello World
+
+ ); + } +} diff --git a/test/__fixtures__/transversioned-site/pages/index.js b/test/__fixtures__/transversioned-site/pages/index.js new file mode 100644 index 0000000000..58dd9accb1 --- /dev/null +++ b/test/__fixtures__/transversioned-site/pages/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class Home extends React.Component { + render() { + return ( + + + Home + + +
Home ...
+
+ ); + } +} diff --git a/test/__fixtures__/transversioned-site/sidebars.json b/test/__fixtures__/transversioned-site/sidebars.json new file mode 100644 index 0000000000..24d61b49c7 --- /dev/null +++ b/test/__fixtures__/transversioned-site/sidebars.json @@ -0,0 +1,11 @@ +{ + "docs": { + "Test": [ + "foo/bar", + "foo/baz" + ], + "Guides": [ + "hello" + ] + } +} diff --git a/test/__fixtures__/transversioned-site/siteConfig.js b/test/__fixtures__/transversioned-site/siteConfig.js new file mode 100644 index 0000000000..661f59c981 --- /dev/null +++ b/test/__fixtures__/transversioned-site/siteConfig.js @@ -0,0 +1,8 @@ +module.exports = { + title: 'Hello', + tagline: 'Hello World', + organizationName: 'endiliey', + projectName: 'hello', + baseUrl: '/', + defaultLanguage: 'en' +}; diff --git a/test/__fixtures__/transversioned-site/static/css/basic.css b/test/__fixtures__/transversioned-site/static/css/basic.css new file mode 100644 index 0000000000..e6e089cbfa --- /dev/null +++ b/test/__fixtures__/transversioned-site/static/css/basic.css @@ -0,0 +1,378 @@ +html, +body { + margin: 0; + padding: 0; +} + +button { + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 100%; + vertical-align: baseline; + font-family: inherit; + font-weight: inherit; + color: inherit; + -webkit-appearance: none; + appearance: none; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +body { + font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.4em; + background: #f5f5f5; + color: #4d4d4d; + min-width: 230px; + max-width: 550px; + margin: 0 auto; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; + font-weight: 300; +} + +button, +input[type="checkbox"] { + outline: none; +} + +.hidden { + display: none; +} + +.todoapp { + background: #fff; + margin: 130px 0 40px 0; + position: relative; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 25px 50px 0 rgba(0, 0, 0, 0.1); +} + +.todoapp input::-webkit-input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::-moz-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp h1 { + position: absolute; + top: -155px; + width: 100%; + font-size: 100px; + font-weight: 100; + text-align: center; + color: rgba(175, 47, 47, 0.15); + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; +} + +.new-todo, +.edit { + position: relative; + margin: 0; + width: 100%; + font-size: 24px; + font-family: inherit; + font-weight: inherit; + line-height: 1.4em; + border: 0; + outline: none; + color: inherit; + padding: 6px; + border: 1px solid #999; + box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +.new-todo { + padding: 16px 16px 16px 60px; + border: none; + background: rgba(0, 0, 0, 0.003); + box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); +} + +.main { + position: relative; + z-index: 2; + border-top: 1px solid #e6e6e6; +} + +label[for='toggle-all'] { + display: none; +} + +.toggle-all { + position: absolute; + top: -55px; + left: -12px; + width: 60px; + height: 34px; + text-align: center; + border: none; /* Mobile Safari */ +} + +.toggle-all:before { + content: '❯'; + font-size: 22px; + color: #e6e6e6; + padding: 10px 27px 10px 27px; +} + +.toggle-all:checked:before { + color: #737373; +} + +.todo-list { + margin: 0; + padding: 0; + list-style: none; +} + +.todo-list li { + position: relative; + font-size: 24px; + border-bottom: 1px solid #ededed; +} + +.todo-list li:last-child { + border-bottom: none; +} + +.todo-list li.editing { + border-bottom: none; + padding: 0; +} + +.todo-list li.editing .edit { + display: block; + width: 506px; + padding: 13px 17px 12px 17px; + margin: 0 0 0 43px; +} + +.todo-list li.editing .view { + display: none; +} + +.todo-list li .toggle { + text-align: center; + width: 40px; + /* auto, since non-WebKit browsers doesn't support input styling */ + height: auto; + position: absolute; + top: 0; + bottom: 0; + margin: auto 0; + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} + +.todo-list li .toggle:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li .toggle:checked:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li label { + white-space: pre-line; + word-break: break-all; + padding: 15px 60px 15px 15px; + margin-left: 45px; + display: block; + line-height: 1.2; + transition: color 0.4s; +} + +.todo-list li.completed label { + color: #d9d9d9; + text-decoration: line-through; +} + +.todo-list li .destroy { + display: none; + position: absolute; + top: 0; + right: 10px; + bottom: 0; + width: 40px; + height: 40px; + margin: auto 0; + font-size: 30px; + color: #cc9a9a; + margin-bottom: 11px; + transition: color 0.2s ease-out; +} + +.todo-list li .destroy:hover { + color: #af5b5e; +} + +.todo-list li .destroy:after { + content: '×'; +} + +.todo-list li:hover .destroy { + display: block; +} + +.todo-list li .edit { + display: none; +} + +.todo-list li.editing:last-child { + margin-bottom: -1px; +} + +.footer { + color: #777; + padding: 10px 15px; + height: 20px; + text-align: center; + border-top: 1px solid #e6e6e6; +} + +.footer:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 50px; + overflow: hidden; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), + 0 8px 0 -3px #f6f6f6, + 0 9px 1px -3px rgba(0, 0, 0, 0.2), + 0 16px 0 -6px #f6f6f6, + 0 17px 2px -6px rgba(0, 0, 0, 0.2); +} + +.todo-count { + float: left; + text-align: left; +} + +.todo-count strong { + font-weight: 300; +} + +.filters { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + right: 0; + left: 0; +} + +.filters li { + display: inline; +} + +.filters li a { + color: inherit; + margin: 3px; + padding: 3px 7px; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} + +.filters li a.selected, +.filters li a:hover { + border-color: rgba(175, 47, 47, 0.1); +} + +.filters li a.selected { + border-color: rgba(175, 47, 47, 0.2); +} + +.clear-completed, +html .clear-completed:active { + float: right; + position: relative; + line-height: 20px; + text-decoration: none; + cursor: pointer; + position: relative; +} + +.clear-completed:hover { + text-decoration: underline; +} + +.info { + margin: 65px auto 0; + color: #bfbfbf; + font-size: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-align: center; +} + +.info p { + line-height: 1; +} + +.info a { + color: inherit; + text-decoration: none; + font-weight: 400; +} + +.info a:hover { + text-decoration: underline; +} + +/* + Hack to remove background from Mobile Safari. + Can't use it globally since it destroys checkboxes in Firefox +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + .toggle-all, + .todo-list li .toggle { + background: none; + } + + .todo-list li .toggle { + height: 40px; + } + + .toggle-all { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-appearance: none; + appearance: none; + } +} + +@media (max-width: 430px) { + .footer { + height: 50px; + } + + .filters { + bottom: 10px; + } +} diff --git a/test/__fixtures__/transversioned-site/static/img/sakura.png b/test/__fixtures__/transversioned-site/static/img/sakura.png new file mode 100644 index 0000000000..e10909398b Binary files /dev/null and b/test/__fixtures__/transversioned-site/static/img/sakura.png differ diff --git a/test/__fixtures__/transversioned-site/static/img/slash-introducing.png b/test/__fixtures__/transversioned-site/static/img/slash-introducing.png new file mode 100644 index 0000000000..8394578868 Binary files /dev/null and b/test/__fixtures__/transversioned-site/static/img/slash-introducing.png differ diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/bar.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/bar.md new file mode 100644 index 0000000000..6daa8d7b81 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.0-bar +title: Bar +--- + +# Remarkable + +> Remarkable로 실시간 편집을 경험하십시오! + +깨끗한 슬레이트로 시작하려면`clear` 링크를 클릭하고 결과를 공유하거나 저장하려면`permalink`를 가져옵니다. + +*** + +# h1 제목 +## h2 제목 +### h3 제목 +#### h4 헤딩 +##### h5 제목 +###### h6 제목 + + +## 수평 규칙 + +___ + +*** + +*** + + +## 활자체 대체 + +입력기 옵션을 사용하면 결과를 볼 수 있습니다. + +(p) (P) + - (r) (t) + +테스트 .. 테스트 ... 테스트 ..... 테스트? ..... 테스트! .... + +!!!!!! ???? ,, + +놀라운 - 굉장한 + +"Smartypants, 큰 따옴표" + +'Smartypants, 작은 따옴표' + + +## 강조 + +** 이것은 굵은 글씨입니다 ** + +__ 이것은 굵은 글씨입니다 __ + +* 이탤릭체 텍스트 * + +_ 이탤릭체 텍스트 _ + +~~ 삭제 된 텍스트 ~~ + +위 첨자 : 19 ^ th ^ + +아래 첨자 : H ~ 2 ~ O + +++ 삽입 된 텍스트 ++ + +== 표시된 텍스트 == \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/baz.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/baz.md new file mode 100644 index 0000000000..7d057cf795 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.0-baz +title: baz +--- + +## 이미지 + +링크와 마찬가지로 이미지에도 각주 스타일 구문이 있습니다. + +! [Alt text] [id] + +나중에 URL 위치를 정의하는 문서에서 참조로 : + +[id] : https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## 링크 + +[링크 텍스트] (http://dev.nodeca.com) + +[제목 링크] (http://nodeca.github.io/pica/demo/ "제목 텍스트!") + +자동 변환 된 링크 https://github.com/nodeca/pica (linkify를 사용하도록 설정) + + + +## 각주 + +각주 1 링크 [^ 첫 번째]. + +각주 2 링크 [^ 초]. + +인라인 각주 ^ [인라인 각주의 텍스트] 정의. + +중복 된 각주 참조 [^ 초]. + +[^ first] : 각주 **는 마크 업을 가질 수 있습니다 ** + +    및 여러 단락. + +[^ 초] : 각주 텍스트. + + +## 정의 목록 + +1 학기 + +정의 1 +게으른 연속. + +* 인라인 마크 업과 함께 2 학기 * + +: 정의 2 + +        {일부 코드, 정의 2의 일부} + +    정의의 세 번째 단락 2. + +_ 컴팩트 스타일 : _ + +1 학기 +  ~ 정의 1 + +2 학기 +  ~ 정의 2a +  ~ 정의 2b + + +## 약어 + +이것은 HTML 약어입니다. + +그것은 "HTML"을 변환하지만 "xxxHTMLyyy"와 같이 부분적인 항목을 그대로 유지합니다. + +* [HTML] : 하이퍼 텍스트 마크 업 언어 \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/hello.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/hello.md new file mode 100644 index 0000000000..5075f44119 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.0/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.0-hello +title: Hello, World ! +--- + +안녕하세요, 여기 엔 틸리에 :) + +## Blockquotes + +> Blockquotes는 또한 중첩 될 수 있습니다 ... +>> ... 서로 옆에 큰 더 큰 부호를 사용하여 ... +>>> ... 또는 화살표 사이에 공백이 있어야합니다. + + +## 목록 + +정렬되지 않은 + ++`+`,`-` 또는`*`를 사용하여 행을 시작하여 목록을 만듭니다. ++ 하위 목록은 2 칸을 들여서 만들어집니다 : +   - 마커 문자 변경으로 새로운 목록 시작 : +     * AC tristique libero volutpat at +     + Preisium nisl aliquet에 대한 + 시설 +     - Nulla volutpat aliquam velit ++ 매우 쉽습니다! + +주문 됨 + +1. Lorem ipsum dolor sit amet +2. 컨소시엄 adipiscing 엘리트 +3. massa에서의 정수 lorem + + +1. 일련 번호를 사용할 수 있습니다 ... +1. ... 또는 모든 숫자를 '1'로 유지하십시오. + +오프셋을 사용하여 번호 매기기 시작 : + +57. foo +1. 막대기 \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/bar.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/bar.md new file mode 100644 index 0000000000..1e9fefaf12 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.1-bar +title: Bar +--- + +# Remarkable + +> Remarkable로 실시간 편집을 경험하십시오! + +깨끗한 슬레이트로 시작하려면`clear` 링크를 클릭하고 결과를 공유하거나 저장하려면`permalink`를 가져옵니다. + +*** + +# h1 제목 +## h2 제목 +### h3 제목 +#### h4 헤딩 +##### h5 제목 +###### h6 제목 + + +## 수평 규칙 + +___ + +*** + +*** + + +## 활자체 대체 + +입력기 옵션을 사용하면 결과를 볼 수 있습니다. + +(p) (P) + - (r) (t) + +테스트 .. 테스트 ... 테스트 ..... 테스트? ..... 테스트! .... + +!!!!!! ???? ,, + +놀라운 - 굉장한 + +"Smartypants, 큰 따옴표" + +'Smartypants, 작은 따옴표' + + +## 강조 + +** 이것은 굵은 글씨입니다 ** + +__ 이것은 굵은 글씨입니다 __ + +* 이탤릭체 텍스트 * + +_ 이탤릭체 텍스트 _ + +~~ 삭제 된 텍스트 ~~ + +위 첨자 : 19 ^ th ^ + +아래 첨자 : H ~ 2 ~ O + +++ 삽입 된 텍스트 ++ + +== 표시된 텍스트 == \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/baz.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/baz.md new file mode 100644 index 0000000000..e6e285d707 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.1-baz +title: baz +--- + +## 이미지 + +링크와 마찬가지로 이미지에도 각주 스타일 구문이 있습니다. + +! [Alt text] [id] + +나중에 URL 위치를 정의하는 문서에서 참조로 : + +[id] : https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## 링크 + +[링크 텍스트] (http://dev.nodeca.com) + +[제목 링크] (http://nodeca.github.io/pica/demo/ "제목 텍스트!") + +자동 변환 된 링크 https://github.com/nodeca/pica (linkify를 사용하도록 설정) + + + +## 각주 + +각주 1 링크 [^ 첫 번째]. + +각주 2 링크 [^ 초]. + +인라인 각주 ^ [인라인 각주의 텍스트] 정의. + +중복 된 각주 참조 [^ 초]. + +[^ first] : 각주 **는 마크 업을 가질 수 있습니다 ** + +    및 여러 단락. + +[^ 초] : 각주 텍스트. + + +## 정의 목록 + +1 학기 + +정의 1 +게으른 연속. + +* 인라인 마크 업과 함께 2 학기 * + +: 정의 2 + +        {일부 코드, 정의 2의 일부} + +    정의의 세 번째 단락 2. + +_ 컴팩트 스타일 : _ + +1 학기 +  ~ 정의 1 + +2 학기 +  ~ 정의 2a +  ~ 정의 2b + + +## 약어 + +이것은 HTML 약어입니다. + +그것은 "HTML"을 변환하지만 "xxxHTMLyyy"와 같이 부분적인 항목을 그대로 유지합니다. + +* [HTML] : 하이퍼 텍스트 마크 업 언어 \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/hello.md b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/hello.md new file mode 100644 index 0000000000..80ef3933a4 --- /dev/null +++ b/test/__fixtures__/transversioned-site/translated_docs/ko/version-1.0.1/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.1-hello +title: Hello, World ! +--- + +안녕하세요, 여기 엔 틸리에 :) + +## Blockquotes + +> Blockquotes는 또한 중첩 될 수 있습니다 ... +>> ... 서로 옆에 큰 더 큰 부호를 사용하여 ... +>>> ... 또는 화살표 사이에 공백이 있어야합니다. + + +## 목록 + +정렬되지 않은 + ++`+`,`-` 또는`*`를 사용하여 행을 시작하여 목록을 만듭니다. ++ 하위 목록은 2 칸을 들여서 만들어집니다 : +   - 마커 문자 변경으로 새로운 목록 시작 : +     * AC tristique libero volutpat at +     + Preisium nisl aliquet에 대한 + 시설 +     - Nulla volutpat aliquam velit ++ 매우 쉽습니다! + +주문 됨 + +1. Lorem ipsum dolor sit amet +2. 컨소시엄 adipiscing 엘리트 +3. massa에서의 정수 lorem + + +1. 일련 번호를 사용할 수 있습니다 ... +1. ... 또는 모든 숫자를 '1'로 유지하십시오. + +오프셋을 사용하여 번호 매기기 시작 : + +57. foo +1. 막대기 \ No newline at end of file diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/bar.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/bar.md new file mode 100644 index 0000000000..ecaf1c0d11 --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.0-bar +title: Bar +--- + +# Remarkable + +> Experience real-time editing with Remarkable! + +Click the `clear` link to start with a clean slate, or get the `permalink` to share or save your results. + +*** + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + + +## Horizontal Rules + +___ + +*** + +*** + + +## Typographic replacements + +Enable typographer option to see result. + +(c) (C) (r) (R) (tm) (TM) (p) (P) +- + +test.. test... test..... test?..... test!.... + +!!!!!! ???? ,, + +Remarkable -- awesome + +"Smartypants, double quotes" + +'Smartypants, single quotes' + + +## Emphasis + +**This is bold text** + +__This is bold text__ + +*This is italic text* + +_This is italic text_ + +~~Deleted text~~ + +Superscript: 19^th^ + +Subscript: H~2~O + +++Inserted text++ + +==Marked text== diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/baz.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/baz.md new file mode 100644 index 0000000000..3b02bd716c --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.0-baz +title: Baz +--- + +## Images + +Like links, Images also have a footnote style syntax + +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## Links + +[link text](http://dev.nodeca.com) + +[link with title](http://nodeca.github.io/pica/demo/ "title text!") + +Autoconverted link https://github.com/nodeca/pica (enable linkify to see) + + + +## Footnotes + +Footnote 1 link[^first]. + +Footnote 2 link[^second]. + +Inline footnote^[Text of inline footnote] definition. + +Duplicated footnote reference[^second]. + +[^first]: Footnote **can have markup** + + and multiple paragraphs. + +[^second]: Footnote text. + + +## Definition lists + +Term 1 + +: Definition 1 +with lazy continuation. + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +_Compact style:_ + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + + +## Abbreviations + +This is HTML abbreviation example. + +It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. + +*[HTML]: Hyper Text Markup Language diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/hello.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/hello.md new file mode 100644 index 0000000000..ef91d00826 --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.0/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.0-hello +title: Hello, World ! +--- + +Hi, Endilie here :) + +## Blockquotes + +> Blockquotes can also be nested... +>> ...by using additional greater-than signs right next to each other... +> > > ...or with spaces between arrows. + + +## Lists + +Unordered + ++ Create a list by starting a line with `+`, `-`, or `*` ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + +Ordered + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa + + +1. You can use sequential numbers... +1. ...or keep all the numbers as `1.` + +Start numbering with offset: + +57. foo +1. bar diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/bar.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/bar.md new file mode 100644 index 0000000000..03b948629b --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.1-bar +title: Bar +--- + +# Remarkable + +> Experience real-time editing with Remarkable! + +Click the `clear` link to start with a clean slate, or get the `permalink` to share or save your results. + +*** + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + + +## Horizontal Rules + +___ + +*** + +*** + + +## Typographic replacements + +Enable typographer option to see result. + +(c) (C) (r) (R) (tm) (TM) (p) (P) +- + +test.. test... test..... test?..... test!.... + +!!!!!! ???? ,, + +Remarkable -- awesome + +"Smartypants, double quotes" + +'Smartypants, single quotes' + + +## Emphasis + +**This is bold text** + +__This is bold text__ + +*This is italic text* + +_This is italic text_ + +~~Deleted text~~ + +Superscript: 19^th^ + +Subscript: H~2~O + +++Inserted text++ + +==Marked text== diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/baz.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/baz.md new file mode 100644 index 0000000000..79aac52ca6 --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.1-baz +title: Baz +--- + +## Images + +Like links, Images also have a footnote style syntax + +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## Links + +[link text](http://dev.nodeca.com) + +[link with title](http://nodeca.github.io/pica/demo/ "title text!") + +Autoconverted link https://github.com/nodeca/pica (enable linkify to see) + + + +## Footnotes + +Footnote 1 link[^first]. + +Footnote 2 link[^second]. + +Inline footnote^[Text of inline footnote] definition. + +Duplicated footnote reference[^second]. + +[^first]: Footnote **can have markup** + + and multiple paragraphs. + +[^second]: Footnote text. + + +## Definition lists + +Term 1 + +: Definition 1 +with lazy continuation. + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +_Compact style:_ + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + + +## Abbreviations + +This is HTML abbreviation example. + +It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. + +*[HTML]: Hyper Text Markup Language diff --git a/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/hello.md b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/hello.md new file mode 100644 index 0000000000..3a81461691 --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_docs/version-1.0.1/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.1-hello +title: Hello, World ! +--- + +Hi, Endilie here :) + +## Blockquotes + +> Blockquotes can also be nested... +>> ...by using additional greater-than signs right next to each other... +> > > ...or with spaces between arrows. + + +## Lists + +Unordered + ++ Create a list by starting a line with `+`, `-`, or `*` ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + +Ordered + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa + + +1. You can use sequential numbers... +1. ...or keep all the numbers as `1.` + +Start numbering with offset: + +57. foo +1. bar diff --git a/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.0-sidebars.json b/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.0-sidebars.json new file mode 100644 index 0000000000..404b11d43b --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.0-sidebars.json @@ -0,0 +1,11 @@ +{ + "version-1.0.0-docs": { + "Test": [ + "version-1.0.0-foo/bar", + "version-1.0.0-foo/baz" + ], + "Guides": [ + "version-1.0.0-hello" + ] + } +} diff --git a/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.1-sidebars.json b/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.1-sidebars.json new file mode 100644 index 0000000000..48287dffc3 --- /dev/null +++ b/test/__fixtures__/transversioned-site/versioned_sidebars/version-1.0.1-sidebars.json @@ -0,0 +1,11 @@ +{ + "version-1.0.1-docs": { + "Test": [ + "version-1.0.1-foo/bar", + "version-1.0.1-foo/baz" + ], + "Guides": [ + "version-1.0.1-hello" + ] + } +} diff --git a/test/__fixtures__/transversioned-site/versions.json b/test/__fixtures__/transversioned-site/versions.json new file mode 100644 index 0000000000..542b187dfe --- /dev/null +++ b/test/__fixtures__/transversioned-site/versions.json @@ -0,0 +1,4 @@ +[ + "1.0.1", + "1.0.0" +] diff --git a/test/__fixtures__/versioned-site/pages/hello/world.js b/test/__fixtures__/versioned-site/pages/hello/world.js new file mode 100644 index 0000000000..838f36bb1a --- /dev/null +++ b/test/__fixtures__/versioned-site/pages/hello/world.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class World extends React.Component { + render() { + return ( + + + World + + +
Hello World
+
+ ); + } +} diff --git a/test/__fixtures__/versioned-site/pages/index.js b/test/__fixtures__/versioned-site/pages/index.js new file mode 100644 index 0000000000..58dd9accb1 --- /dev/null +++ b/test/__fixtures__/versioned-site/pages/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import Helmet from 'react-helmet'; +import Layout from '@theme/Layout'; + +export default class Home extends React.Component { + render() { + return ( + + + Home + + +
Home ...
+
+ ); + } +} diff --git a/test/__fixtures__/versioned-site/sidebars.json b/test/__fixtures__/versioned-site/sidebars.json new file mode 100644 index 0000000000..49667e47b5 --- /dev/null +++ b/test/__fixtures__/versioned-site/sidebars.json @@ -0,0 +1,10 @@ +{ + "docs": { + "Getting Started": [ + "installation" + ], + "Guides": [ + "blog" + ] + } +} diff --git a/test/__fixtures__/versioned-site/siteConfig.js b/test/__fixtures__/versioned-site/siteConfig.js new file mode 100644 index 0000000000..e64b9989cf --- /dev/null +++ b/test/__fixtures__/versioned-site/siteConfig.js @@ -0,0 +1,7 @@ +module.exports = { + title: 'Hello', + tagline: 'Hello World', + organizationName: 'endiliey', + projectName: 'hello', + baseUrl: '/' +}; diff --git a/test/__fixtures__/versioned-site/static/css/basic.css b/test/__fixtures__/versioned-site/static/css/basic.css new file mode 100644 index 0000000000..e6e089cbfa --- /dev/null +++ b/test/__fixtures__/versioned-site/static/css/basic.css @@ -0,0 +1,378 @@ +html, +body { + margin: 0; + padding: 0; +} + +button { + margin: 0; + padding: 0; + border: 0; + background: none; + font-size: 100%; + vertical-align: baseline; + font-family: inherit; + font-weight: inherit; + color: inherit; + -webkit-appearance: none; + appearance: none; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +body { + font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; + line-height: 1.4em; + background: #f5f5f5; + color: #4d4d4d; + min-width: 230px; + max-width: 550px; + margin: 0 auto; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; + font-weight: 300; +} + +button, +input[type="checkbox"] { + outline: none; +} + +.hidden { + display: none; +} + +.todoapp { + background: #fff; + margin: 130px 0 40px 0; + position: relative; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 25px 50px 0 rgba(0, 0, 0, 0.1); +} + +.todoapp input::-webkit-input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::-moz-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp input::input-placeholder { + font-style: italic; + font-weight: 300; + color: #e6e6e6; +} + +.todoapp h1 { + position: absolute; + top: -155px; + width: 100%; + font-size: 100px; + font-weight: 100; + text-align: center; + color: rgba(175, 47, 47, 0.15); + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; +} + +.new-todo, +.edit { + position: relative; + margin: 0; + width: 100%; + font-size: 24px; + font-family: inherit; + font-weight: inherit; + line-height: 1.4em; + border: 0; + outline: none; + color: inherit; + padding: 6px; + border: 1px solid #999; + box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + font-smoothing: antialiased; +} + +.new-todo { + padding: 16px 16px 16px 60px; + border: none; + background: rgba(0, 0, 0, 0.003); + box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); +} + +.main { + position: relative; + z-index: 2; + border-top: 1px solid #e6e6e6; +} + +label[for='toggle-all'] { + display: none; +} + +.toggle-all { + position: absolute; + top: -55px; + left: -12px; + width: 60px; + height: 34px; + text-align: center; + border: none; /* Mobile Safari */ +} + +.toggle-all:before { + content: '❯'; + font-size: 22px; + color: #e6e6e6; + padding: 10px 27px 10px 27px; +} + +.toggle-all:checked:before { + color: #737373; +} + +.todo-list { + margin: 0; + padding: 0; + list-style: none; +} + +.todo-list li { + position: relative; + font-size: 24px; + border-bottom: 1px solid #ededed; +} + +.todo-list li:last-child { + border-bottom: none; +} + +.todo-list li.editing { + border-bottom: none; + padding: 0; +} + +.todo-list li.editing .edit { + display: block; + width: 506px; + padding: 13px 17px 12px 17px; + margin: 0 0 0 43px; +} + +.todo-list li.editing .view { + display: none; +} + +.todo-list li .toggle { + text-align: center; + width: 40px; + /* auto, since non-WebKit browsers doesn't support input styling */ + height: auto; + position: absolute; + top: 0; + bottom: 0; + margin: auto 0; + border: none; /* Mobile Safari */ + -webkit-appearance: none; + appearance: none; +} + +.todo-list li .toggle:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li .toggle:checked:after { + content: url('data:image/svg+xml;utf8,'); +} + +.todo-list li label { + white-space: pre-line; + word-break: break-all; + padding: 15px 60px 15px 15px; + margin-left: 45px; + display: block; + line-height: 1.2; + transition: color 0.4s; +} + +.todo-list li.completed label { + color: #d9d9d9; + text-decoration: line-through; +} + +.todo-list li .destroy { + display: none; + position: absolute; + top: 0; + right: 10px; + bottom: 0; + width: 40px; + height: 40px; + margin: auto 0; + font-size: 30px; + color: #cc9a9a; + margin-bottom: 11px; + transition: color 0.2s ease-out; +} + +.todo-list li .destroy:hover { + color: #af5b5e; +} + +.todo-list li .destroy:after { + content: '×'; +} + +.todo-list li:hover .destroy { + display: block; +} + +.todo-list li .edit { + display: none; +} + +.todo-list li.editing:last-child { + margin-bottom: -1px; +} + +.footer { + color: #777; + padding: 10px 15px; + height: 20px; + text-align: center; + border-top: 1px solid #e6e6e6; +} + +.footer:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 50px; + overflow: hidden; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), + 0 8px 0 -3px #f6f6f6, + 0 9px 1px -3px rgba(0, 0, 0, 0.2), + 0 16px 0 -6px #f6f6f6, + 0 17px 2px -6px rgba(0, 0, 0, 0.2); +} + +.todo-count { + float: left; + text-align: left; +} + +.todo-count strong { + font-weight: 300; +} + +.filters { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + right: 0; + left: 0; +} + +.filters li { + display: inline; +} + +.filters li a { + color: inherit; + margin: 3px; + padding: 3px 7px; + text-decoration: none; + border: 1px solid transparent; + border-radius: 3px; +} + +.filters li a.selected, +.filters li a:hover { + border-color: rgba(175, 47, 47, 0.1); +} + +.filters li a.selected { + border-color: rgba(175, 47, 47, 0.2); +} + +.clear-completed, +html .clear-completed:active { + float: right; + position: relative; + line-height: 20px; + text-decoration: none; + cursor: pointer; + position: relative; +} + +.clear-completed:hover { + text-decoration: underline; +} + +.info { + margin: 65px auto 0; + color: #bfbfbf; + font-size: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-align: center; +} + +.info p { + line-height: 1; +} + +.info a { + color: inherit; + text-decoration: none; + font-weight: 400; +} + +.info a:hover { + text-decoration: underline; +} + +/* + Hack to remove background from Mobile Safari. + Can't use it globally since it destroys checkboxes in Firefox +*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + .toggle-all, + .todo-list li .toggle { + background: none; + } + + .todo-list li .toggle { + height: 40px; + } + + .toggle-all { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-appearance: none; + appearance: none; + } +} + +@media (max-width: 430px) { + .footer { + height: 50px; + } + + .filters { + bottom: 10px; + } +} diff --git a/test/__fixtures__/versioned-site/static/img/sakura.png b/test/__fixtures__/versioned-site/static/img/sakura.png new file mode 100644 index 0000000000..e10909398b Binary files /dev/null and b/test/__fixtures__/versioned-site/static/img/sakura.png differ diff --git a/test/__fixtures__/versioned-site/static/img/slash-introducing.png b/test/__fixtures__/versioned-site/static/img/slash-introducing.png new file mode 100644 index 0000000000..8394578868 Binary files /dev/null and b/test/__fixtures__/versioned-site/static/img/slash-introducing.png differ diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/bar.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/bar.md new file mode 100644 index 0000000000..ecaf1c0d11 --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.0-bar +title: Bar +--- + +# Remarkable + +> Experience real-time editing with Remarkable! + +Click the `clear` link to start with a clean slate, or get the `permalink` to share or save your results. + +*** + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + + +## Horizontal Rules + +___ + +*** + +*** + + +## Typographic replacements + +Enable typographer option to see result. + +(c) (C) (r) (R) (tm) (TM) (p) (P) +- + +test.. test... test..... test?..... test!.... + +!!!!!! ???? ,, + +Remarkable -- awesome + +"Smartypants, double quotes" + +'Smartypants, single quotes' + + +## Emphasis + +**This is bold text** + +__This is bold text__ + +*This is italic text* + +_This is italic text_ + +~~Deleted text~~ + +Superscript: 19^th^ + +Subscript: H~2~O + +++Inserted text++ + +==Marked text== diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/baz.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/baz.md new file mode 100644 index 0000000000..3b02bd716c --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.0-baz +title: Baz +--- + +## Images + +Like links, Images also have a footnote style syntax + +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## Links + +[link text](http://dev.nodeca.com) + +[link with title](http://nodeca.github.io/pica/demo/ "title text!") + +Autoconverted link https://github.com/nodeca/pica (enable linkify to see) + + + +## Footnotes + +Footnote 1 link[^first]. + +Footnote 2 link[^second]. + +Inline footnote^[Text of inline footnote] definition. + +Duplicated footnote reference[^second]. + +[^first]: Footnote **can have markup** + + and multiple paragraphs. + +[^second]: Footnote text. + + +## Definition lists + +Term 1 + +: Definition 1 +with lazy continuation. + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +_Compact style:_ + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + + +## Abbreviations + +This is HTML abbreviation example. + +It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. + +*[HTML]: Hyper Text Markup Language diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/hello.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/hello.md new file mode 100644 index 0000000000..ef91d00826 --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.0/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.0-hello +title: Hello, World ! +--- + +Hi, Endilie here :) + +## Blockquotes + +> Blockquotes can also be nested... +>> ...by using additional greater-than signs right next to each other... +> > > ...or with spaces between arrows. + + +## Lists + +Unordered + ++ Create a list by starting a line with `+`, `-`, or `*` ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + +Ordered + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa + + +1. You can use sequential numbers... +1. ...or keep all the numbers as `1.` + +Start numbering with offset: + +57. foo +1. bar diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/bar.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/bar.md new file mode 100644 index 0000000000..03b948629b --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/bar.md @@ -0,0 +1,66 @@ +--- +id: version-1.0.1-bar +title: Bar +--- + +# Remarkable + +> Experience real-time editing with Remarkable! + +Click the `clear` link to start with a clean slate, or get the `permalink` to share or save your results. + +*** + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + + +## Horizontal Rules + +___ + +*** + +*** + + +## Typographic replacements + +Enable typographer option to see result. + +(c) (C) (r) (R) (tm) (TM) (p) (P) +- + +test.. test... test..... test?..... test!.... + +!!!!!! ???? ,, + +Remarkable -- awesome + +"Smartypants, double quotes" + +'Smartypants, single quotes' + + +## Emphasis + +**This is bold text** + +__This is bold text__ + +*This is italic text* + +_This is italic text_ + +~~Deleted text~~ + +Superscript: 19^th^ + +Subscript: H~2~O + +++Inserted text++ + +==Marked text== diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/baz.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/baz.md new file mode 100644 index 0000000000..79aac52ca6 --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/foo/baz.md @@ -0,0 +1,74 @@ +--- +id: version-1.0.1-baz +title: Baz +--- + +## Images + +Like links, Images also have a footnote style syntax + +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +## Links + +[link text](http://dev.nodeca.com) + +[link with title](http://nodeca.github.io/pica/demo/ "title text!") + +Autoconverted link https://github.com/nodeca/pica (enable linkify to see) + + + +## Footnotes + +Footnote 1 link[^first]. + +Footnote 2 link[^second]. + +Inline footnote^[Text of inline footnote] definition. + +Duplicated footnote reference[^second]. + +[^first]: Footnote **can have markup** + + and multiple paragraphs. + +[^second]: Footnote text. + + +## Definition lists + +Term 1 + +: Definition 1 +with lazy continuation. + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +_Compact style:_ + +Term 1 + ~ Definition 1 + +Term 2 + ~ Definition 2a + ~ Definition 2b + + +## Abbreviations + +This is HTML abbreviation example. + +It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. + +*[HTML]: Hyper Text Markup Language diff --git a/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/hello.md b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/hello.md new file mode 100644 index 0000000000..3a81461691 --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_docs/version-1.0.1/hello.md @@ -0,0 +1,40 @@ +--- +id: version-1.0.1-hello +title: Hello, World ! +--- + +Hi, Endilie here :) + +## Blockquotes + +> Blockquotes can also be nested... +>> ...by using additional greater-than signs right next to each other... +> > > ...or with spaces between arrows. + + +## Lists + +Unordered + ++ Create a list by starting a line with `+`, `-`, or `*` ++ Sub-lists are made by indenting 2 spaces: + - Marker character change forces new list start: + * Ac tristique libero volutpat at + + Facilisis in pretium nisl aliquet + - Nulla volutpat aliquam velit ++ Very easy! + +Ordered + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa + + +1. You can use sequential numbers... +1. ...or keep all the numbers as `1.` + +Start numbering with offset: + +57. foo +1. bar diff --git a/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.0-sidebars.json b/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.0-sidebars.json new file mode 100644 index 0000000000..404b11d43b --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.0-sidebars.json @@ -0,0 +1,11 @@ +{ + "version-1.0.0-docs": { + "Test": [ + "version-1.0.0-foo/bar", + "version-1.0.0-foo/baz" + ], + "Guides": [ + "version-1.0.0-hello" + ] + } +} diff --git a/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.1-sidebars.json b/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.1-sidebars.json new file mode 100644 index 0000000000..48287dffc3 --- /dev/null +++ b/test/__fixtures__/versioned-site/versioned_sidebars/version-1.0.1-sidebars.json @@ -0,0 +1,11 @@ +{ + "version-1.0.1-docs": { + "Test": [ + "version-1.0.1-foo/bar", + "version-1.0.1-foo/baz" + ], + "Guides": [ + "version-1.0.1-hello" + ] + } +} diff --git a/test/__fixtures__/versioned-site/versions.json b/test/__fixtures__/versioned-site/versions.json new file mode 100644 index 0000000000..542b187dfe --- /dev/null +++ b/test/__fixtures__/versioned-site/versions.json @@ -0,0 +1,4 @@ +[ + "1.0.1", + "1.0.0" +] diff --git a/test/load/pages.test.js b/test/load/pages.test.js index b00d554924..7a76e76a82 100644 --- a/test/load/pages.test.js +++ b/test/load/pages.test.js @@ -3,11 +3,7 @@ import path from 'path'; describe('loadPages', () => { test('valid pages', async () => { - const pagesDir = path.join( - __dirname, - '__fixtures__', - 'simple-pages' - ); + const pagesDir = path.join(__dirname, '__fixtures__', 'simple-pages'); const pagesData = await loadPages(pagesDir); expect(pagesData).toMatchSnapshot(); expect(pagesData).not.toBeNull(); diff --git a/test/load/utils.test.js b/test/load/utils.test.js index bf9e54e463..8264c71e7e 100644 --- a/test/load/utils.test.js +++ b/test/load/utils.test.js @@ -65,6 +65,7 @@ describe('load utils', () => { versions: [] } }; + const test = {arr: [1, 2, 3]}; const variable = 'enabledLanguages'; expect(idx(a, [('b', 'c')])).toBeUndefined(); expect(idx(b, ['hello'])).toEqual('world'); @@ -79,6 +80,7 @@ describe('load utils', () => { 'en', 'ja' ]); + expect(idx(test, ['arr', 0])).toEqual(1); expect(idx(undefined)).toBeUndefined(); expect(idx(null)).toBeNull(); }); diff --git a/test/loadSetup.js b/test/loadSetup.js index d16f447c38..b990354f6c 100644 --- a/test/loadSetup.js +++ b/test/loadSetup.js @@ -3,14 +3,24 @@ import load from '@lib/load'; // Helper methods to setup dummy/ fake projects const loadSetup = async name => { - const simpleWebsite = path.join(__dirname, '__fixtures__', 'simple-website'); - const customWebsite = path.join(__dirname, '__fixtures__', 'custom-website'); + const fixtures = path.join(__dirname, '__fixtures__'); + const simpleSite = path.join(fixtures, 'simple-site'); + const customSite = path.join(fixtures, 'custom-site'); + const versionedSite = path.join(fixtures, 'versioned-site'); + const translatedSite = path.join(fixtures, 'translated-site'); + const transversionedSite = path.join(fixtures, 'transversioned-site'); switch (name) { case 'simple': - return load(simpleWebsite); + return load(simpleSite); case 'custom': - return load(customWebsite); + return load(customSite); + case 'versioned': + return load(versionedSite); + case 'transversioned': + return load(transversionedSite); + case 'translated': + return load(translatedSite); default: return {}; }