Skip to content

Refactor DocumentationVersionHint component and update styles #307

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

Merged
merged 3 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/pnpm-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
name: pnpm Setup
description: Install Node and pnpm, install dependencies
runs:
using: "composite"
using: 'composite'
steps:
- uses: pnpm/action-setup@v4
with:
version: 9
version: 10
run_install: false

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: 'pnpm'

- run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: ./.github/actions/pnpm-setup

- name: Lint
run: pnpm run lint:hard
run: pnpm run lint

- name: Build
run: pnpm run build
4 changes: 2 additions & 2 deletions .github/workflows/dod-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
types: [opened, edited, synchronize]

concurrency:
group: pr-{{ github.event.pull_request.number }}
group: 'pr-${{ github.event.pull_request.number }}'
cancel-in-progress: true

jobs:
check-dod:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Print Pull Request ID
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/draft-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
shell: bash
run: |
mkdir -p dist/docs
mv build dist/docs/2.2/
mv build dist/v2/

- name: Netlify Deploy
uses: netlify/actions/cli@master
Expand All @@ -47,6 +47,6 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
Netlify Draft Deployment
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}/docs/2.2
URL: ${{ steps.netlify.outputs.NETLIFY_URL }}/v2
Logs: ${{ steps.netlify.outputs.NETLIFY_LOGS_URL }}
edit-mode: replace
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Bump version
shell: bash
run: pnpm version patch --no-git-tag-version
run: pnpm version prerelease --no-git-tag-version

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
138 changes: 0 additions & 138 deletions .kolibri.config.json

This file was deleted.

8 changes: 0 additions & 8 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
# - npm
legacy-peer-deps=true
save-exact=true

# - pnpm
auto-install-peers=true
prefer-offline=true
shamefully-hoist=true
strict-peer-dependencies=false
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"useTabs": true
}
61 changes: 36 additions & 25 deletions docusaurus.config.js → docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const { themes } = require('prism-react-renderer');
import { themes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type { PostCssOptions } from '@docusaurus/types';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';

const PUBLIC_BASE_URL = 'https://public-ui.github.io/';
const PUBLIC_BASE_URL = 'https://public-ui.github.io';

/** @type {import('@docusaurus/types').Config} */
const config = {
const config: Config = {
title: 'KoliBri - Public UI',
tagline: 'The accessible Web Component Library',
url: 'https://public-ui.github.io',
baseUrl: '/docs/2.2/',
url: PUBLIC_BASE_URL,
baseUrl: '/v2/',
onBrokenLinks: 'throw',
trailingSlash: false,
onBrokenMarkdownLinks: 'warn',
Expand All @@ -33,11 +36,11 @@ const config = {
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
routeBasePath: '/',
routeBasePath: '/docs',
sidebarCollapsible: true,
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: './sidebars.js',
// Remove this to remove the "edit this page" links.
// editUrl: 'https://github.com/public-ui/documentation/blob/main/packages/docusaurus/',
// lastVersion: 'current',
Expand All @@ -49,23 +52,22 @@ const config = {
// },
},
blog: false,
pages: false,
sitemap: {
changefreq: 'daily',
priority: 0.5,
ignorePatterns: ['/blog/tags/**', '/docs/tags/**'],
filename: 'sitemap.xml',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: './src/css/custom.css',
},
}),
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
{
navbar: {
title: 'KoliBri',
logo: {
Expand All @@ -78,24 +80,28 @@ const config = {
position: 'left',
dropdownActiveClassDisabled: true,
dropdownItemsAfter: [
{
type: 'html',
className: 'dropdown-archived-versions',
value: '<strong class="dropdown__link">Version 2</strong>',
},
{
type: 'html',
value: '<hr class="dropdown-separator">',
},
{
type: 'html',
className: 'dropdown-archived-versions',
value: '<b>Archive</b>',
value: '<span class="dropdown__link">Version 1</span>',
},
{ to: `${PUBLIC_BASE_URL}docs/2.2/`, label: '2.2' },
],
},
{
label: 'Dokumentation',
to: '/',
to: '/docs',
position: 'left',
},
{ to: `${PUBLIC_BASE_URL}blog`, label: 'Blog', position: 'left' },
{ to: `${PUBLIC_BASE_URL}/blog`, label: 'Blog', position: 'left' },
{ type: 'search', position: 'right' },
// {
// href: 'https://public-ui.github.io/designer',
Expand All @@ -120,15 +126,15 @@ const config = {
items: [
{
label: 'Dokumentation',
to: '/',
to: '/docs',
},
{
label: 'Blog',
to: `${PUBLIC_BASE_URL}blog`,
to: `${PUBLIC_BASE_URL}/blog`,
},
{
label: 'Impressum',
to: `${PUBLIC_BASE_URL}docs/impressum`,
to: `${PUBLIC_BASE_URL}/docs/impressum`,
},
],
},
Expand Down Expand Up @@ -180,18 +186,23 @@ const config = {
dark: 'forest',
},
},
}),
},
markdown: {
mermaid: true,
},
plugins: [
async () => {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {

configurePostCss(postcssOptions: PostCssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require('tailwindcss'));
postcssOptions.plugins.push(require('autoprefixer'));
if (!Array.isArray(postcssOptions.plugins)) {
postcssOptions.plugins = [];
}

postcssOptions.plugins.push(tailwindcss());
postcssOptions.plugins.push(autoprefixer());
return postcssOptions;
},
};
Expand Down Expand Up @@ -239,4 +250,4 @@ const config = {
themes: ['@docusaurus/theme-mermaid'],
};

module.exports = config;
export default config;
Loading
Loading