mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
- Split documentation into separate User and Developer sites - Migrated existing docs to proper Docusaurus structure - Added custom Tibber-themed header logos (light + dark mode variants) - Implemented custom color scheme matching integration branding - Hero gradient: Cyan → Dark Cyan → Gold - Removed standard Docusaurus purple/green theme - Integrated Giscus comments system for community collaboration - User docs: Comments enabled on guides, examples, FAQ - User docs: Comments disabled on reference pages (glossary, sensors, troubleshooting) - Developer docs: No comments (GitHub Issues/PRs preferred) - Added categorized sidebars with emoji navigation - Created 8 new placeholder documentation pages - Fixed image paths for baseUrl compatibility (local + GitHub Pages) - Escaped MDX special characters in performance metrics - Added GitHub Actions workflow for automated deployment - Created helper scripts: dev-user, dev-developer, build-all Breaking changes: - Moved /docs/user/*.md to /docs/user/docs/*.md - Moved /docs/development/*.md to /docs/developer/docs/*.md
220 lines
5.5 KiB
TypeScript
220 lines
5.5 KiB
TypeScript
import {themes as prismThemes} from 'prism-react-renderer';
|
|
import type {Config} from '@docusaurus/types';
|
|
import type * as Preset from '@docusaurus/preset-classic';
|
|
|
|
const config: Config = {
|
|
title: 'Tibber Prices Integration',
|
|
tagline: 'Custom Home Assistant integration for Tibber electricity prices',
|
|
favicon: 'img/logo.svg',
|
|
|
|
future: {
|
|
v4: true,
|
|
},
|
|
|
|
url: 'https://jpawlowski.github.io',
|
|
baseUrl: '/hass.tibber_prices/user/',
|
|
|
|
organizationName: 'jpawlowski',
|
|
projectName: 'hass.tibber_prices',
|
|
deploymentBranch: 'gh-pages',
|
|
trailingSlash: false,
|
|
|
|
onBrokenLinks: 'warn',
|
|
|
|
markdown: {
|
|
mermaid: true,
|
|
hooks: {
|
|
onBrokenMarkdownLinks: 'warn',
|
|
},
|
|
},
|
|
|
|
themes: ['@docusaurus/theme-mermaid'],
|
|
|
|
plugins: [
|
|
'docusaurus-lunr-search',
|
|
],
|
|
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en'],
|
|
},
|
|
|
|
headTags: [
|
|
{
|
|
tagName: 'link',
|
|
attributes: {
|
|
rel: 'preconnect',
|
|
href: 'https://fonts.googleapis.com',
|
|
},
|
|
},
|
|
{
|
|
tagName: 'link',
|
|
attributes: {
|
|
rel: 'preconnect',
|
|
href: 'https://fonts.gstatic.com',
|
|
crossorigin: 'anonymous',
|
|
},
|
|
},
|
|
{
|
|
tagName: 'link',
|
|
attributes: {
|
|
rel: 'stylesheet',
|
|
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap',
|
|
},
|
|
},
|
|
],
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
{
|
|
docs: {
|
|
routeBasePath: '/',
|
|
sidebarPath: './sidebars.ts',
|
|
editUrl: ({versionDocsDirPath, docPath}) => {
|
|
if (versionDocsDirPath.includes('_versioned_')) {
|
|
const version = versionDocsDirPath.match(/version-([^/]+)/)?.[1] || 'main';
|
|
return `https://github.com/jpawlowski/hass.tibber_prices/tree/${version}/docs/user/docs/${docPath}`;
|
|
}
|
|
return `https://github.com/jpawlowski/hass.tibber_prices/tree/main/docs/user/docs/${docPath}`;
|
|
},
|
|
showLastUpdateTime: true,
|
|
versions: {
|
|
current: {
|
|
label: 'Next 🚧',
|
|
banner: 'unreleased',
|
|
badge: true,
|
|
},
|
|
},
|
|
},
|
|
blog: false,
|
|
theme: {
|
|
customCss: './src/css/custom.css',
|
|
},
|
|
} satisfies Preset.Options,
|
|
],
|
|
],
|
|
|
|
themeConfig: {
|
|
mermaid: {
|
|
theme: {light: 'base', dark: 'dark'},
|
|
options: {
|
|
themeVariables: {
|
|
// Light mode colors
|
|
primaryColor: '#e6f7ff',
|
|
primaryTextColor: '#1a1a1a',
|
|
primaryBorderColor: '#00b9e7',
|
|
lineColor: '#00b9e7',
|
|
secondaryColor: '#e6fff5',
|
|
secondaryTextColor: '#1a1a1a',
|
|
secondaryBorderColor: '#00ffa3',
|
|
tertiaryColor: '#fff9e6',
|
|
tertiaryTextColor: '#1a1a1a',
|
|
tertiaryBorderColor: '#ffb800',
|
|
noteBkgColor: '#e6f7ff',
|
|
noteTextColor: '#1a1a1a',
|
|
noteBorderColor: '#00b9e7',
|
|
// Node styling
|
|
mainBkg: '#ffffff',
|
|
nodeBorder: '#00b9e7',
|
|
clusterBkg: '#f0f9ff',
|
|
clusterBorder: '#00b9e7',
|
|
// Font styling
|
|
fontFamily: 'Inter, system-ui, -apple-system, sans-serif',
|
|
fontSize: '14px',
|
|
},
|
|
},
|
|
},
|
|
image: 'img/social-card.png',
|
|
colorMode: {
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
docs: {
|
|
sidebar: {
|
|
hideable: true,
|
|
autoCollapseCategories: true,
|
|
},
|
|
},
|
|
navbar: {
|
|
title: 'Tibber Prices HA',
|
|
logo: {
|
|
alt: 'Tibber Prices Integration Logo',
|
|
src: 'img/logo.svg',
|
|
},
|
|
items: [
|
|
{
|
|
to: '/intro',
|
|
label: 'User Guide',
|
|
position: 'left',
|
|
},
|
|
{
|
|
href: 'https://jpawlowski.github.io/hass.tibber_prices/developer/',
|
|
label: 'Developer Docs',
|
|
position: 'left',
|
|
},
|
|
{
|
|
type: 'docsVersionDropdown',
|
|
position: 'right',
|
|
dropdownActiveClassDisabled: true,
|
|
},
|
|
{
|
|
href: 'https://github.com/jpawlowski/hass.tibber_prices',
|
|
label: 'GitHub',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Documentation',
|
|
items: [
|
|
{
|
|
label: 'User Guide',
|
|
to: '/intro',
|
|
},
|
|
{
|
|
label: 'Developer Guide',
|
|
href: 'https://jpawlowski.github.io/hass.tibber_prices/developer/',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Community',
|
|
items: [
|
|
{
|
|
label: 'GitHub Issues',
|
|
href: 'https://github.com/jpawlowski/hass.tibber_prices/issues',
|
|
},
|
|
{
|
|
label: 'Home Assistant Community',
|
|
href: 'https://community.home-assistant.io/',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'More',
|
|
items: [
|
|
{
|
|
label: 'GitHub',
|
|
href: 'https://github.com/jpawlowski/hass.tibber_prices',
|
|
},
|
|
{
|
|
label: 'Release Notes',
|
|
href: 'https://github.com/jpawlowski/hass.tibber_prices/releases',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
copyright: `Not affiliated with Tibber AS. Community-maintained custom integration. Built with Docusaurus.`,
|
|
},
|
|
prism: {
|
|
theme: prismThemes.github,
|
|
darkTheme: prismThemes.dracula,
|
|
additionalLanguages: ['bash', 'yaml', 'json'],
|
|
},
|
|
} satisfies Preset.ThemeConfig,
|
|
};
|
|
|
|
export default config;
|