From c112c34f84939b97e692c1e85be1877d672fe611 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 10 May 2020 19:43:39 +0200 Subject: [PATCH] Minor site config changes (#503) --- docusaurus.config.js | 126 +++++++++++++++++++++++++----------- src/pages/index.js | 44 ++++++------- src/pages/styles.module.css | 17 +++++ 3 files changed, 127 insertions(+), 60 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 3fe70495..7b983361 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,80 +1,134 @@ module.exports = { - title: 'Home Assistant Developer Docs', - tagline: 'All you need to start developing for Home Assistant', - url: 'https://developers.home-assistant.io', - baseUrl: '/', - favicon: 'img/favicon.png', - organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. + title: "Home Assistant Developer Documentation", + tagline: "All you need to start developing for Home Assistant", + url: "https://developers.home-assistant.io", + baseUrl: "/", + favicon: "img/favicon.png", + organizationName: "home-assistant", + projectName: "developers.home-assistant", themeConfig: { googleAnalytics: { - trackingID: 'UA-57927901-3', + trackingID: "UA-57927901-3", }, navbar: { - title: 'Developer Docs', + title: "Developers", logo: { - alt: 'Home Assistant', - src: 'img/logo-pretty.svg', + alt: "Home Assistant", + src: "img/logo-pretty.svg", }, links: [ - {to: 'docs/architecture_index', label: 'Architecture', position: 'left'}, - {to: 'docs/frontend_index', label: 'Frontend', position: 'left'}, - {to: 'docs/development_index', label: 'Backend', position: 'left'}, - {to: 'docs/misc', label: 'Misc', position: 'left'}, - {to: 'blog', label: 'Blog', position: 'left'}, + { + to: "docs/architecture_index", + label: "Architecture", + position: "left", + }, + { to: "docs/frontend_index", label: "Frontend", position: "left" }, + { to: "docs/development_index", label: "Backend", position: "left" }, + { to: "docs/misc", label: "Misc", position: "left" }, + { to: "blog", label: "Blog", position: "left" }, ], }, footer: { logo: { - alt: 'Home Assistant', - src: 'img/logo-white.svg', - href: 'https://www.home-assistant.io', + alt: "Home Assistant", + src: "img/logo-white.svg", + href: "https://www.home-assistant.io", }, - style: 'dark', + style: "dark", links: [ { - title: 'Social', + title: "More Home Assistant", items: [ { - label: 'Blog', - to: 'blog', + label: "Homepage", + href: "https://www.home-assistant.io", }, { - label: 'GitHub', - href: 'https://github.com/home-assistant/developers.home-assistant', + label: "Data Science Portal", + href: "https://data.home-assistant.io", }, { - label: 'Twitter', - href: 'https://twitter.com/hass_devs', + label: "Alerts", + href: "https://alerts.home-assistant.io", + }, + { + label: "System Status", + href: "https://status.home-assistant.io/", + }, + ], + }, + { + title: "Social", + items: [ + { + label: "Blog", + to: "blog", + }, + { + label: "GitHub", + href: "https://github.com/home-assistant", + }, + { + label: "Twitter", + href: "https://twitter.com/hass_devs", + }, + { + label: "Discord chat", + href: "https://www.home-assistant.io/join-chat", + }, + ], + }, + { + title: "Other", + items: [ + { + label: "Privacy", + href: "https://www.home-assistant.io/privacy/", + }, + { + label: "Security", + href: "https://www.home-assistant.io/security/", + }, + ], + }, + { + items: [ + { + html: ` + + Deploys by Netlify + + `, }, ], }, ], copyright: `Copyright © ${new Date().getFullYear()} Home Assistant, Inc. Built with Docusaurus.`, }, - image: 'img/default-social.png', + image: "img/default-social.png", algolia: { - apiKey: 'd0245452c36b10cec4b8b5bad04e06fc', - indexName: 'home-assistant-dev', - algoliaOptions: {} + apiKey: "d0245452c36b10cec4b8b5bad04e06fc", + indexName: "home-assistant-dev", + algoliaOptions: {}, }, }, presets: [ [ - '@docusaurus/preset-classic', + "@docusaurus/preset-classic", { docs: { - sidebarPath: require.resolve('./sidebars.js'), + sidebarPath: require.resolve("./sidebars.js"), editUrl: - 'https://github.com/home-assistant/developers.home-assistant/edit/master/', + "https://github.com/home-assistant/developers.home-assistant/edit/master/", + showLastUpdateTime: true, }, theme: { - customCss: require.resolve('./src/css/custom.css'), + customCss: require.resolve("./src/css/custom.css"), }, blog: { postsPerPage: 10, feedOptions: { - type: 'all', + type: "all", }, }, }, diff --git a/src/pages/index.js b/src/pages/index.js index 9d3bafa1..060400e9 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,15 +1,15 @@ -import React from 'react'; -import classnames from 'classnames'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import useBaseUrl from '@docusaurus/useBaseUrl'; -import styles from './styles.module.css'; +import React from "react"; +import classnames from "classnames"; +import Layout from "@theme/Layout"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import useBaseUrl from "@docusaurus/useBaseUrl"; +import styles from "./styles.module.css"; const features = [ { title: <>Document Structure, - imageUrl: '', + imageUrl: "", description: ( <>

@@ -42,14 +42,12 @@ const features = [ }, { title: <>Popular Topics, - imageUrl: '', + imageUrl: "", description: ( <>