cachethq / docs

The documentation for Cachet.

Home Page:https://docs.cachethq.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code-groups not working correctly in this theme

thebootable opened this issue · comments

short description

It seems that the Vitepress Code Groups are not working as intended.
I assume it's a problem in the theme.

environment

I'm using firefox and chrome on ubuntu. The page was created with the dev-environement.

observed behavior

When using a ::: code-group block in a markdown-file, the contents get resolved to seperate blocks and show a radiobutton-menu on the top that has no effect on the look of the page itself.

Screenshot

screenshot_code-group

used code

I used the sample code from vitepress:

::: code-group

```js [config.js]
/**
 * @type {import('vitepress').UserConfig}
 */
const config = {
  // ...
}

export default config
```

```ts [config.ts]
import type { UserConfig } from 'vitepress'

const config: UserConfig = {
  // ...
}


export default config
```

:::

expected behavior

I'd expect to have a combined code-block with a menu on the top to choose between the code-blocks. See also Vitepress documentation for Code Groups.
Because the basic functionality seems to work and it looks more like a displayed problem, I assume it's a problem with the theme.
I have no error-messages or logs that would indicate otherwise

Personally, I think code-groups would be a good fit for documentation. Of course there are other styling options but it's a neat feature and should be supported by the theme.

I agree this would be cool. Please can you open an issue on the pilgrim-theme repo.

ah yeah, was not sure if it really is an issue with the theme.
I opened an issue, see davidhemphill/pilgrim-theme#3