Skip to content

Commit

Permalink
fixed gh-pages with docz routes
Browse files Browse the repository at this point in the history
  • Loading branch information
sag1v committed Sep 8, 2018
1 parent 90a4f66 commit 3f73cd5
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 113 deletions.
82 changes: 53 additions & 29 deletions .docz/app/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A flexible and responsive carousel component for react",
"themeConfig": {
"logo": {
"src": "http://cdn.onlinewebfonts.com/svg/img_569227.png",
"src": "//cdn.onlinewebfonts.com/svg/img_569227.png",
"width": 50
},
"mode": "light",
Expand All @@ -24,15 +24,17 @@
}
}
},
"ordering": "descending",
"ordering": "ascending",
"version": "1.0.0",
"repository": "https://github.com/sag1v/react-elastic-carousel",
"hashRouter": true,
"base": "/react-elastic-carousel/",
"htmlContext": {
"head": {
"links": [
{
"rel": "stylesheet",
"href": "https://codemirror.net/theme/dracula.css"
"href": "//codemirror.net/theme/dracula.css"
}
]
}
Expand All @@ -52,7 +54,7 @@
{
"depth": 2,
"slug": "install",
"value": "Install"
"value": "install"
},
{
"depth": 2,
Expand All @@ -62,7 +64,7 @@
{
"depth": 2,
"slug": "play",
"value": "Play"
"value": "play"
},
{
"depth": 2,
Expand All @@ -71,6 +73,17 @@
}
]
},
"src/docs/components/mdx/easing.mdx": {
"name": "easing",
"order": 7,
"route": "/easing",
"menu": "Examples",
"id": "78888c6e0beacced3b7b973b66223dce",
"filepath": "src/docs/components/mdx/easing.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/easing.mdx",
"slug": "src-docs-components-mdx-easing",
"headings": []
},
"src/docs/components/mdx/breakpoints.mdx": {
"name": "breakPoints",
"order": 3,
Expand All @@ -82,15 +95,15 @@
"slug": "src-docs-components-mdx-breakpoints",
"headings": []
},
"src/docs/components/mdx/easing.mdx": {
"name": "easing",
"src/docs/components/mdx/enableAutoPlay.mdx": {
"name": "enableAutoPlay",
"order": 7,
"route": "/easing",
"route": "/enableAutoPlay",
"menu": "Examples",
"id": "78888c6e0beacced3b7b973b66223dce",
"filepath": "src/docs/components/mdx/easing.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/easing.mdx",
"slug": "src-docs-components-mdx-easing",
"id": "e5ed8a42173892b88aa17a4b5b18ed5e",
"filepath": "src/docs/components/mdx/enableAutoPlay.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/enableAutoPlay.mdx",
"slug": "src-docs-components-mdx-enable-auto-play",
"headings": []
},
"src/docs/components/mdx/initialFirstItem.mdx": {
Expand All @@ -115,15 +128,15 @@
"slug": "src-docs-components-mdx-focus-on-select",
"headings": []
},
"src/docs/components/mdx/isRTL.mdx": {
"name": "isRTL",
"order": 6,
"route": "/isRTL",
"src/docs/components/mdx/itemPadding.mdx": {
"name": "itemPadding",
"order": 8,
"route": "/itemPadding",
"menu": "Examples",
"id": "9bc60693fd682815630e5e523056aeb2",
"filepath": "src/docs/components/mdx/isRTL.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/isRTL.mdx",
"slug": "src-docs-components-mdx-is-rtl",
"id": "e7b229c12d81372bc77c79253aff52b9",
"filepath": "src/docs/components/mdx/itemPadding.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemPadding.mdx",
"slug": "src-docs-components-mdx-item-padding",
"headings": []
},
"src/docs/components/mdx/itemsToScroll.mdx": {
Expand All @@ -137,22 +150,33 @@
"slug": "src-docs-components-mdx-items-to-scroll",
"headings": []
},
"src/docs/components/mdx/itemPadding.mdx": {
"name": "itemPadding",
"order": 2,
"route": "/itemPadding",
"src/docs/components/mdx/isRTL.mdx": {
"name": "isRTL",
"order": 6,
"route": "/isRTL",
"menu": "Examples",
"id": "e7b229c12d81372bc77c79253aff52b9",
"filepath": "src/docs/components/mdx/itemPadding.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemPadding.mdx",
"slug": "src-docs-components-mdx-item-padding",
"id": "9bc60693fd682815630e5e523056aeb2",
"filepath": "src/docs/components/mdx/isRTL.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/isRTL.mdx",
"slug": "src-docs-components-mdx-is-rtl",
"headings": []
},
"src/docs/components/mdx/onUserNext.mdx": {
"name": "onUserNext",
"order": 9,
"route": "/onUserNext",
"menu": "Examples",
"id": "60dbc989aa6f0edfc7d189f0815b4484",
"filepath": "src/docs/components/mdx/onUserNext.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/onUserNext.mdx",
"slug": "src-docs-components-mdx-on-user-next",
"headings": []
},
"src/docs/components/mdx/itemsToShow.mdx": {
"name": "itemsToShow",
"order": 1,
"route": "/itemsToShow",
"menu": "Examples",
"order": 1,
"id": "98c52d751af6a05ed757dec7408e238f",
"filepath": "src/docs/components/mdx/itemsToShow.mdx",
"link": "https://github.com/sag1v/react-elastic-carousel\\edit\\master\\src/docs/components/mdx/itemsToShow.mdx",
Expand Down
8 changes: 4 additions & 4 deletions .docz/app/imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export const imports = {
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-initial-first-item" */ 'src/docs/components/mdx/initialFirstItem.mdx'),
'src/docs/components/mdx/focusOnSelect.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-focus-on-select" */ 'src/docs/components/mdx/focusOnSelect.mdx'),
'src/docs/components/mdx/isRTL.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-is-rtl" */ 'src/docs/components/mdx/isRTL.mdx'),
'src/docs/components/mdx/itemPadding.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-item-padding" */ 'src/docs/components/mdx/itemPadding.mdx'),
'src/docs/components/mdx/itemsToScroll.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-scroll" */ 'src/docs/components/mdx/itemsToScroll.mdx'),
'src/docs/components/mdx/itemsToShow.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-show" */ 'src/docs/components/mdx/itemsToShow.mdx'),
'src/docs/components/mdx/isRTL.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-is-rtl" */ 'src/docs/components/mdx/isRTL.mdx'),
'src/docs/components/mdx/onUserNext.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-on-user-next" */ 'src/docs/components/mdx/onUserNext.mdx'),
'src/docs/components/mdx/itemsToShow.mdx': () =>
import(/* webpackPrefetch: true, webpackChunkName: "src-docs-components-mdx-items-to-show" */ 'src/docs/components/mdx/itemsToShow.mdx'),
}
1 change: 0 additions & 1 deletion .docz/app/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'webpack-serve-overlay'
import React from 'react'
import ReactDOM from 'react-dom'
import Root from './root'
Expand Down
9 changes: 1 addition & 8 deletions .docz/app/root.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ import Theme from 'docz-theme-default'
import { imports } from './imports'
import db from './db.json'

const Root = () => (
<Theme
db={db}
imports={imports}
hashRouter={false}
websocketUrl="ws://127.0.0.1:60505"
/>
)
const Root = () => <Theme db={db} imports={imports} hashRouter={true} />

export default hot(module)(Root)
10 changes: 7 additions & 3 deletions doczrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import path from 'path'

import libName from './libName';

export default {
hashRouter: true,
base: `/${libName}/`,
ordering: "ascending",
modifyBundlerConfig: config => {
config.resolve.alias = {
...config.resolve.alias,
"react-elastic-carousel":path.join(__dirname, "/src/react-elastic-carousel/index.js")
[libName]:path.join(__dirname, `/src/${libName}/index.js`)
}
return config;
},
htmlContext: {
head: {
links: [{
rel: 'stylesheet',
href: 'https://codemirror.net/theme/dracula.css'
href: '//codemirror.net/theme/dracula.css'
}]
}
},
themeConfig: {
logo: {
src: "http://cdn.onlinewebfonts.com/svg/img_569227.png",
src: "//cdn.onlinewebfonts.com/svg/img_569227.png",
width: 50
},
mode: 'light',
Expand Down
2 changes: 2 additions & 0 deletions libName.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import pkg from './package.json';
export default pkg.name;
Loading

0 comments on commit 3f73cd5

Please sign in to comment.