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

docs: add missing syntax highlight #1507

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test: add modal test

When you have a breaking change:

```
```sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix conventional commit message format for breaking changes

The commit message format for breaking changes should follow the conventional commits specification more precisely.

Apply this correction:

-git commit -a "feat: change btnClass name to bClass" -m "BREAKING CHANGE: change the Button component attributes"
+git commit -m "feat!: change btnClass name to bClass" -m "BREAKING CHANGE: rename Button component's btnClass attribute to bClass"

The ! after the type indicates a breaking change, and the description should be more specific about what changed.

Committable suggestion skipped: line range outside the PR's diff.

git commit -a "feat: change btnClass name to bClass" -m "BREAKING CHANGE: change the Button component attributes"
```

Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/components/darkmode.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Finally, use the dark mode component to display a switcher (that is a button) fo

Use `class="dark"` to set the initial theme to the dark mode. The default mode is `light`.

```
```html
<html class="dark" lang="en">
```

Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/pages/compiler-speed.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: Learn how you can manage and improve the Svelte compilation speed w

If your Svelte app only requires a few components, it's recommended that you import them directly. Doing so can help optimize compilation speed and improve performance by reducing the amount of code that needs to be processed during compilation. Since version 0.34.1, it's now possible to import individual components.

```
```js
import Alert from 'flowbite-svelte/Alert.svelte'
```

Expand Down
6 changes: 3 additions & 3 deletions src/routes/docs/pages/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Start by creating your own component based on Flowbite-Svelte.

Create a new file for your button component in the lib directory:

```
```svelte example hideOutput
// src/lib/MyButton.svelte
<script>
import { Button } from 'flowbite-svelte'
Expand All @@ -84,15 +84,15 @@ Once you have created your button component, you can use it in your project.

In your project, import your custom button component:

```
```js
<script>
import MyButton from "$lib/MyButton.svelte"
</script>
```

Use the custom button component in your project by adding the following code:

```
```html
<MyButton>My New Button</MyButton>
```

Expand Down
10 changes: 5 additions & 5 deletions src/routes/docs/pages/faq-and-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,27 @@ The following example shows how to add navigation using the key blocks:

First build the current setting and check the CSS size.

```
```sh
pnpm build
```

Then run the following command to see your compiled CSS sizes.

```
```sh
find .svelte-kit/output/client/_app/immutable -type f -name "*.css" -exec du -h {} +
```

To purge the CSS files, you can use `vite-plugin-tailwind-purgecss`.

### Installation

```
```sh
pnpm i -D vite-plugin-tailwind-purgecss
```

### vite.config.ts

```
```js
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
Expand All @@ -98,6 +98,6 @@ export default defineConfig({

Run `pnpm build` and run the same command to see the compiled CSS size.

```
```sh
find .svelte-kit/output/client/_app/immutable -type f -name "*.css" -exec du -h {} +
```
4 changes: 2 additions & 2 deletions src/routes/docs/pages/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This first command is to generate component documentation for all Svelte files w

Please run the following to format the code.

```
```sh
pnpm format && pnpm check
```

Expand All @@ -113,7 +113,7 @@ feat!: add drawer component and page

When you have a breaking change:

```
```sh
git commit -a "feat: change btnClass name to bClass" -m "BREAKING CHANGE: change the Button component attributes"
```

Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/pages/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Learn more about the value types and class interfaces that you can

Enhance the reliability and scalability of your user interface code by leveraging data types. Here's an example of how to use them:

```
```typescript
import { Button, type SizeType } from 'flowbite-svelte';
export let size: SizeType = 'lg'
```
Expand Down