Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): update to docusuarus 2.0.0-alpha.59 #121

Merged
merged 12 commits into from
Jul 27, 2020
41 changes: 6 additions & 35 deletions docs/_website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
'https://fonts.googleapis.com/css2?family=Roboto&family=Open+Sans&display=swap',
'https://cdn.rawgit.com/luizbills/feather-icon-font/v4.7.0/dist/feather.css',
],
plugins: ['@docusaurus/plugin-google-analytics'],
plugins: [],
danielhochman marked this conversation as resolved.
Show resolved Hide resolved
customFields: {
tagDescription: 'An extensible platform for infrastructure management.',
hero: {
Expand Down Expand Up @@ -105,7 +105,9 @@ module.exports = {
},
},
themeConfig: {
disableDarkMode: true,
colorMode: {
disableSwitch: true,
},
googleAnalytics: {
trackingID: 'UA-170615678-4',
anonymizeIP: true,
Expand All @@ -119,49 +121,18 @@ module.exports = {
theme: require('prism-react-renderer/themes/vsDark'),
},
navbar: {
title: 'Clutch',
logo: {
alt: 'Clutch Logo',
src: 'img/navigation/logoMark.svg',
},
links: [
{
to: 'docs/about/what-is-clutch',
activeBasePath: 'docs',
icon: "fe fe-book",
label: 'Docs',
},
{
to: 'docs/community',
activeBasePath: 'docs',
icon: "fe fe-message-square",
label: 'Community',
},
{
href: 'https://github.com/lyft/clutch',
icon: "fe fe-github",
label: 'GitHub',
},
],
items: [], // items are defined directly in the swizzled component so they can have an icon attr.
},
footer: {
style: 'light',
logo: {
src: "img/navigation/logo.svg"
},
socialLinks: [
{
icon: 'fe fe-github',
href: 'https://github.com/lyft/clutch',
},
{
icon: 'fe fe-twitter',
href: 'https://twitter.com/clutchdotsh',
},
{
icon: 'fe fe-slack',
href: 'https://join.slack.com/t/lyftoss/shared_invite/zt-casz6lz4-G7gOx1OhHfeMsZKFe1emSA',
},
],
links: [
{
title: 'About',
Expand Down
4 changes: 4 additions & 0 deletions docs/_website/generator/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func getTemplateData() *templateData {
}

for _, file := range files {
if strings.Contains(file, "node_modules") {
// ignore sub packages from builds.
continue
}
w := getWorkflowPackage(file)
td.WorkflowPackages = append(td.WorkflowPackages, w)
}
Expand Down
4 changes: 2 additions & 2 deletions docs/_website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"netlify": "netlify"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.58",
"@docusaurus/preset-classic": "2.0.0-alpha.58",
"@docusaurus/core": "2.0.0-alpha.59",
"@docusaurus/preset-classic": "2.0.0-alpha.59",
"classnames": "^2.2.6",
"prismjs": "^1.20.0",
"react": "^16.8.4",
Expand Down
17 changes: 16 additions & 1 deletion docs/_website/src/theme/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ import useLogo from '@theme/hooks/useLogo';

import styles from './styles.module.css';

var socialLinks = [
{
icon: 'fe fe-github',
href: 'https://github.com/lyft/clutch',
},
{
icon: 'fe fe-twitter',
href: 'https://twitter.com/clutchdotsh',
},
{
icon: 'fe fe-slack',
href: 'https://join.slack.com/t/lyftoss/shared_invite/zt-casz6lz4-G7gOx1OhHfeMsZKFe1emSA',
},
];

function FooterLink({to, href, label, prependBaseUrlToHref, ...props}) {
const toUrl = useBaseUrl(to);
const normalizedHref = useBaseUrl(href, true);
Expand Down Expand Up @@ -126,7 +141,7 @@ function Footer() {
const {themeConfig = {}} = siteConfig;
const {footer} = themeConfig;

const {copyright, links = [], socialLinks = []} = footer || {};
const {copyright, links = []} = footer || {};

if (!footer) {
return null;
Expand Down
39 changes: 29 additions & 10 deletions docs/_website/src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ import styles from './styles.module.css';
// retrocompatible with v1
const DefaultNavItemPosition = 'right';

// items defined here instead of config so they can have an associated icon
var items = [
danielhochman marked this conversation as resolved.
Show resolved Hide resolved
{
to: 'docs/about/what-is-clutch',
activeBasePath: 'docs',
icon: "fe fe-book",
label: 'Docs',
},
{
to: 'docs/community',
activeBasePath: 'docs',
icon: "fe fe-message-square",
label: 'Community',
},
{
href: 'https://github.com/lyft/clutch',
icon: "fe fe-github",
label: 'GitHub',
},
];

function NavLink({
activeBasePath,
activeBaseRegex,
Expand Down Expand Up @@ -160,8 +181,8 @@ function Navbar() {
const {
siteConfig: {
themeConfig: {
navbar: { title, links = [], hideOnScroll = false } = {},
disableDarkMode = false,
navbar: { title, hideOnScroll = false } = {},
colorMode: {disableSwitch: disableColorModeSwitch = false} = {},
},
},
isClient,
Expand Down Expand Up @@ -195,7 +216,7 @@ function Navbar() {
}
}, [windowSize]);

const { leftLinks, rightLinks } = splitLinks(links);
const { leftLinks, rightLinks } = splitLinks(items);

return (
<nav
Expand All @@ -207,7 +228,7 @@ function Navbar() {
})}>
<div className="navbar__inner">
<div className="navbar__items">
{links != null && links.length !== 0 && (
{items != null && items.length !== 0 && (
<div
aria-label="Navigation bar toggle"
className="navbar__toggle"
Expand Down Expand Up @@ -256,7 +277,7 @@ function Navbar() {
{rightLinks.map((linkItem, i) => (
<NavItem {...linkItem} key={i} />
))}
{!disableDarkMode && (
{!disableColorModeSwitch && (
<Toggle
className={styles.displayOnlyInLargeViewport}
aria-label="Dark mode toggle"
Expand Down Expand Up @@ -286,11 +307,9 @@ function Navbar() {
alt={logoAlt}
/>
)}
{title != null && (
<strong className="navbar__title">{title}</strong>
)}
<img className={clsx('navbar__title', styles.navbarLogoTextCustom, {[styles.hideLogoText]: isSearchBarExpanded})} src={useBaseUrl("img/navigation/logoText.svg")} />
</Link>
{!disableDarkMode && sidebarShown && (
{!disableColorModeSwitch && sidebarShown && (
<Toggle
aria-label="Dark mode toggle in sidebar"
checked={isDarkTheme}
Expand All @@ -301,7 +320,7 @@ function Navbar() {
<div className="navbar-sidebar__items">
<div className="menu">
<ul className="menu__list">
{links.map((linkItem, i) => (
{items.map((linkItem, i) => (
<MobileNavItem {...linkItem} onClick={hideSidebar} key={i} />
))}
</ul>
Expand Down
Loading