Skip to content

Commit

Permalink
Update sidebar config (hacs#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Feb 27, 2022
1 parent ffada8e commit a135eb3
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 44 deletions.
1 change: 1 addition & 0 deletions documentation/basic/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
id: getting_started
title: Getting started
description: "Getting started"
sidebar_position: 0
---

![entry page](/img/panel/entry.png)
Expand Down
1 change: 1 addition & 0 deletions documentation/categories/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
id: integrations
title: Integrations
description: "Category: Integrations"
sidebar_position: 0
---

Integrations in HACS (or custom_components as they are often referred to) are community-built integrations.
Expand Down
1 change: 1 addition & 0 deletions documentation/developer/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
id: start
title: Getting started
description: "Getting started with HACS development"
sidebar_position: 0
---

This integration is **massive** and there are a lot of areas to contribute to.
Expand Down
7 changes: 0 additions & 7 deletions documentation/faq/what.md

This file was deleted.

2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = {
{ to: 'docs/community_guides', label: 'Guides', position: 'left' },
{ to: 'docs/default_repositories', label: 'Repositories', position: 'left' },
{ to: 'docs/developer/start', label: 'Developer docs', position: 'right' },
{ to: 'docs/faq/what', label: 'FAQ', position: 'right' },
{ to: 'docs/faq/addons', label: 'FAQ', position: 'right' },
{ to: 'help', label: 'Help', position: 'right' },
],
},
Expand Down
2 changes: 1 addition & 1 deletion script/generate_default_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def gen_brands_icon(entry):

BASE += f"\n## {title}\n\n"
BASE += f"_{len(entries)} Repositories in total._\n\n"
for entry in sorted(entries, key=lambda entry: entry["full_name"].lower()):
for entry in sorted(entries, key=lambda entry: entry["full_name"].lower())[0:5 if os.environ.get("REMOTE_CONTAINERS") else -1]:
repository_id = entry['full_name'].replace("/", "_").replace("-", "_").lower()

BASE += f"<li><a href='/docs/repositories/{entry['category']}/{repository_id}'>{entry['full_name']}</a></li>\n"
Expand Down
54 changes: 21 additions & 33 deletions sidebars.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
module.exports = {
usage: {
Basic: [
'basic/getting_started',
'basic/updates',
'basic/existing_elements',
'basic/sensor',
'basic/theming',
'basic/diagnostics',
'basic/logs',
{
type: 'autogenerated',
dirName: 'basic',
}
],
Navigation: ['navigation/overview', 'navigation/stores'],
Navigation: [{
type: 'autogenerated',
dirName: 'navigation',
}],
Categories: [
'categories/integrations',
'categories/plugins',
'categories/appdaemon_apps',
'categories/netdaemon_apps',
'categories/python_scripts',
'categories/themes',
{
type: 'autogenerated',
dirName: 'categories',
}
],
},
setup: {
Expand All @@ -27,13 +25,10 @@ module.exports = {
},
'developer documentation': {
'HACS Development': [
'developer/start',
'developer/devcontainer',
'developer/translation',
'developer/documentation',
'developer/backend',
'developer/frontend',
'developer/maintainer',
{
type: 'autogenerated',
dirName: 'developer',
}
],
'Publish to HACS': [
'publish/start',
Expand All @@ -48,17 +43,10 @@ module.exports = {
'publish/remove',
],
},
FAQ: {
FAQ: [
'faq/what',
'faq/highlights',
'faq/hassio_only',
'faq/addons',
'faq/download',
'faq/upgrade',
'faq/status_not_loaded',
'faq/custom_repositories',
'faq/limitations',
FAQ: [
{
type: 'autogenerated',
dirName: 'faq',
},
],
},
}
5 changes: 3 additions & 2 deletions static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ https://install.hacs.xyz https://raw.githubusercontent.com/hacs/get/main/get 301
/docs/installation/installation /docs/setup/download
/docs/installation/remove /docs/setup/remove

/docs/faq/initial_startup /
/docs/configuration/start /docs/configuration/basic
/default_repositories /docs/default_repositories
/default_repositories /docs/default_repositories

/* / 404
Binary file modified static/img/panel/entry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a135eb3

Please sign in to comment.