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

bug with typedoc #12

Open
Chewawi opened this issue Jan 27, 2025 · 4 comments
Open

bug with typedoc #12

Chewawi opened this issue Jan 27, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Chewawi
Copy link

Chewawi commented Jan 27, 2025

with overrides.Sidebar: true:
Image


with overrides.Sidebar: false:
Image

this is my astro config:

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import { ion } from "starlight-ion-theme";

import { createStarlightTypeDocPlugin } from 'starlight-typedoc'

const [kodkordTypeDoc, kodkordTypeDocSidebarGroup] = createStarlightTypeDocPlugin()
const [classesTypeDoc, classesTypeDocSidebarGroup] = createStarlightTypeDocPlugin()

// https://astro.build/config
export default defineConfig({
	integrations: [
		starlight({
			title: 'My Docs',
			social: {
				github: 'https://github.com/withastro/starlight',
			},
			plugins: [
				ion({
					icons: { iconDir: './src/assets/icons' },
					overrides: {
						Sidebar: false
					},
					footer: {
						text: '©️ Kodeko Studios 2025',
						links: [{
							text: 'Homepage',
							href: 'https://kodkord.dev',
						}],
						icons: [{
							name: 'github',
							href: 'https://github.com/.../...'
						}]
					}
				}),
				kodkordTypeDoc({
					entryPoints: ['./Kodcord/packages/kodkord/src/index.ts'],
					output: "api-kodkord",
					tsconfig: './Kodcord/packages/kodkord/tsconfig.json',
					sidebar: {
						label: "Kodkord",
						collapsed: true
					},
					typeDoc: {
						sort: ["enum-value-ascending", "source-order"],
						parametersFormat: "table",
						enumMembersFormat: "table",
						skipErrorChecking: true,
					}
				}),
				classesTypeDoc({
					entryPoints: ['./Kodcord/packages/classes/src/index.ts'],
					output: "api-classes",
					tsconfig: './Kodcord/packages/classes/tsconfig.json',
					sidebar: {
						label: "Classes",
					},
					typeDoc: {
						categorizeByGroup: true,
						skipErrorChecking: true,
					}
				}),
			],
			sidebar: [
				{
					label: '[home] Home',
					link: '/'
				},
				{
					label: 'Guides',
					items: [
						// Each item here is one entry in the navigation menu.
						{ label: 'Example Guide', slug: 'guides/example' },
					],
				},
				{
					label: '[book] Reference',
					autogenerate: { directory: 'reference' },
				},
				{
					label: 'API',
					items: [
						kodkordTypeDocSidebarGroup,
						classesTypeDocSidebarGroup,
					],
				},
			],
		}),
	],
});

why it happens? 😭

@louisescher
Copy link
Owner

This happens because the sidebar that Ion shows is a component override, and setting overrides.Sidebar to false removes that override.
See https://louisescher.github.io/starlight-ion-theme/getting-started/#overrides for more info

@louisescher louisescher added invalid This doesn't seem right question Further information is requested wontfix This will not be worked on labels Jan 28, 2025
@Chewawi
Copy link
Author

Chewawi commented Jan 30, 2025

This issue highlights that enabling the sidebar causes Typedoc pages (e.g., API/Kodkord and API/Classes, shown in the second screenshot) to disappear. I thought the two screenshots would make it obvious, but I apologize for not providing more context earlier. Let me know if you need further details! 🤷‍♂️

@Chewawi
Copy link
Author

Chewawi commented Jan 30, 2025

@louisescher

Image

@louisescher louisescher reopened this Jan 30, 2025
@louisescher
Copy link
Owner

@Chewawi is your repo open source? I'm gonna need to reproduce this

@louisescher louisescher added bug Something isn't working and removed invalid This doesn't seem right question Further information is requested wontfix This will not be worked on labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants