Skip to content

Commit

Permalink
Merge pull request #307 from elijah-potter/grammar-fixes
Browse files Browse the repository at this point in the history
docs: fix minor grammatical errors
  • Loading branch information
Blackman99 authored Dec 30, 2024
2 parents f4b5d97 + 5757331 commit 4e42804
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 48 deletions.
10 changes: 5 additions & 5 deletions packages/docs-site/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ export default {
collapsible: true,
items: [
{
title: 'What is sveltepress',
title: 'What is Sveltepress',
to: '/guide/introduction/',
},
{
title: 'Quick start',
title: 'Quick Start',
to: '/guide/quick-start/',
},
{
title: 'Themes',
to: '/guide/themes/',
},
{
title: 'Working with Typescript',
title: 'Working with TypeScript',
to: '/guide/typescript/',
},
],
Expand All @@ -26,15 +26,15 @@ export default {
title: 'Markdown features',
items: [
{
title: 'Basic writing',
title: 'Basic Writing',
to: '/guide/markdown/basic-writing/',
},
{
title: 'Frontmatter',
to: '/guide/markdown/frontmatter/',
},
{
title: 'Svelte in markdown',
title: 'Svelte in Markdown',
to: '/guide/markdown/svelte-in-markdown/',
},
],
Expand Down
8 changes: 4 additions & 4 deletions packages/docs-site/src/routes/guide/typescript/+page.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Working with Typescript
title: Working with TypeScript
---

See
See:

* [Vite plugin typescript support](/reference/vite-plugin/#Working-with-typescript)
* [Default theme typescript support](/reference/default-theme/#Working-with-typescript)
* [Vite plugin TypeScript support](/reference/vite-plugin/#Working-with-typescript)
* [Default theme TypeScript support](/reference/default-theme/#Working-with-typescript)
44 changes: 23 additions & 21 deletions packages/docs-site/src/routes/reference/default-theme/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Default theme

@install-pkg(@sveltepress/theme-default)

## Add in your vite config
## Add in your Vite config

```js title="vite.config.(js|ts)"
import { defaultTheme } from '@sveltepress/theme-default' // [svp! ++]
Expand All @@ -25,7 +25,7 @@ const config = defineConfig({
export default config
```

## Types overview
## Types Overview

@code(/../theme-default/types.d.ts)

Expand All @@ -34,29 +34,31 @@ export default config
### `navbar`

* `title`
The label text of the navbar item
The label text of the item in the navigation bar.
* `to`
The link address
* `icon`
An HTML string. Will show the html content instead of `title`. It is useful to display a custom icon on the navbar
An HTML string. Will show the html content instead of `title`. It is useful to display a custom icon on the navbar.
* `external`
Determine whether the link is external or not.
Would render an external icon if set to `true`
* `items`
Children links. If this prop is provided would render a dropdown instead of a single nav link
Children links.
If this prop is provided it would render a dropdown instead of a single link.

### `discord`
The discord chat channel link
Would show a discord icon on the navbar when provided

The web invite address to the project's Discord server.
Would show a discord icon on the navigation bar when provided.

### `github`
The github repo link
Would show a github icon on the navbar when provided

The web address of the project's GitHub repository.
Would show a GitHub icon on the navigation bar when provided

### `logo`

The logo image
Would show on the navbar
The address of the site's logo, to be shown on the navigation bar.

### `sidebar`

Expand Down Expand Up @@ -87,10 +89,10 @@ You can get all the supported languages and themes in [Shiki Repo](https://githu

### `editLink`

The link used for bottom edit this page on github button
The link used for bottom edit this page on GitHub button
For example this site use `https://github.com/Blackman99/sveltepress/edit/main/packages/docs-site/src/routes/:route`

`:route` represent the route path, for example: /foo/bar/+page.md
`:route` represent the route path, for example: `/foo/bar/+page.md`

### `ga`

Expand All @@ -101,11 +103,11 @@ Would add gtag script in site head if provided.

### `docsearch`

* appId
* apiKey
* indexName
* `appId`
* `apiKey`
* `indexName`

All these values are provided by the docsearch.
All these values are provided by Algolia.
Visit [Docsearch](https://docsearch.algolia.com/) for more details.

### `pwa`
Expand All @@ -114,7 +116,7 @@ See [PWA](/guide/default-theme/pwa/) for details.

### `themeColor`

The color of window bar when opened as a local pwa application.
The color of window bar when opened as a local PWA application.

* `light` - the color that applied on light theme
* `dark` - the color that applied on dark theme
Expand All @@ -138,7 +140,7 @@ The fixed text contents that can be replaced by your config.
* `previousPage` - The text for "Previous"
* `nextPage` - The text for "Next"
* `expansionTitle` - The text for "Click to expand/fold code" in markdown or svelte live code
* `pwa` - The pwa prompt relative text contents. All of the following fields correspond to the same text in pwa prompt
* `pwa` - The PWA prompt relative text contents. All of the following fields correspond to the same text in PWA prompt
* `tip`
* `reload`
* `close`
Expand Down Expand Up @@ -225,9 +227,9 @@ Here's an example for showing the theme options of this site:
</style>
```

## Working with typescript
## Working with TypeScript

You need to include `@sveltepress/theme-default/types` in your src/app.d.ts to get theme options and virtual modules type tips
You need to include `@sveltepress/theme-default/types` in your `src/app.d.ts` to get theme options and virtual modules type tips

```ts title="/src/app.d.ts"
/// <reference types="@sveltepress/theme-default/types" />
Expand Down
36 changes: 18 additions & 18 deletions packages/docs-site/src/routes/reference/vite-plugin/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ title: Vite plugin

### `siteConfig`

* `title`: The site title. Would be `'Untitled site'` if not provided.
* `description`: The site description. Would be `'Build by sveltepress'` if not provided.
* `title`: The site's title. Would be `'Untitled site'` if not provided.
* `description`: The site's description. Would be `'Build by sveltepress'` if not provided.

### `addInspect`

If set to `true`, will add [Vite plugin inspect](https://github.com/antfu/vite-plugin-inspect).
It is useful to inspect or observe the vite pipeline.
It is useful to inspect or observe the Vite pipeline.

### `theme`

See [ResolvedTheme](#ResolvedTheme) below
See [`ResolvedTheme`](#ResolvedTheme) below

### `remarkPlugins`

Expand All @@ -38,22 +38,22 @@ Read [Rehype plugins](https://github.com/rehypejs/rehype#plugins) for more detai

### `name`

The name of theme
The name of the theme.

### `globalLayout`

The absolute path of global layout. **Should be a svelte file**
The absolute path of the global layout. **Should be a svelte file**
For example: `path.resolve(process.cwd(), 'ThemeGlobalLayout.svelte')`

### `pageLayout`

The absolute path of page layout. **Should be a svelte file**
The absolute path of the page layout. **Should be a svelte file**
For example: `path.resolve(process.cwd(), 'ThemePageLayout.svelte')`

### `vitePlugins`

* If passed a plugin or a group of plugins. These plugins would applied in front of `sveltepress`
* If passed a function. It will accept the `sveltepress` plugin and need to return a group of plugins.
* If passed a plugin or a group of plugins, these plugins would applied in before `sveltepress`
* If passed a function, it will accept the `sveltepress` plugin and need to return a group of plugins.
You can customize the `sveltepress` plugin order in your returned plugin chain.

:::info[About theme vite plugins]{icon=vscode-icons:file-type-vite}
Expand All @@ -64,17 +64,17 @@ For example: `path.resolve(process.cwd(), 'ThemePageLayout.svelte')`
### `highlighter`

Used for code highlighting.
For example, the default theme use [shiki](https://github.com/shikijs/shiki).
For example, the default theme use [Shiki](https://github.com/shikijs/shiki).
You can check the [Default theme highlighter source code](https://github.com/Blackman99/sveltepress/blob/256c1abe6be51d37fa1ff5f9148368207c47a7ae/packages/theme-default/src/markdown/highlighter.ts) for detail usage.

### `remarkPlugins`

The remark plugins used for markdown parse.
The remark plugins used for Markdown parsing.
Read [Remark plugins](https://github.com/remarkjs/remark#plugins) for more details.

### `rehypePlugins`

The rehype plugins used for html generator.
The rehype plugins used for HTML generation.
Read [Rehype plugins](https://github.com/rehypejs/rehype#plugins) for more details.

:::important[Plugins order]{icon=solar:reorder-outline}
Expand Down Expand Up @@ -105,7 +105,7 @@ Customize the footnotes title, default is: `"Footnotes"`

### `virtual:sveltepress/site`

This module hold the siteConfig. Here's an example
This module holds the `siteConfig`. For example:

```svelte live
<script>
Expand All @@ -118,11 +118,11 @@ This module hold the siteConfig. Here's an example

## Low level API

The @sveltepress/vite package has a low level api function `mdToSvelte`
The `@sveltepress/vite` package has a low level function `mdToSvelte`.

It is used for all the major markdown render in Sveltepress.
It is used for all the major Markdown rendering in Sveltepress.

It can be used for a more basic markdown render engine involved with Svelte.
It can be used for a more basic Markdown render engine involved with Svelte.

Here's usage example:

Expand Down Expand Up @@ -158,9 +158,9 @@ code
data
```

## Working with typescript
## Working with TypeScript

You need to include `@sveltepress/vite/types` in your src/app.d.ts to get plugin options and virtual modules type tips
You need to include `@sveltepress/vite/types` in your `src/app.d.ts` to get plugin options and virtual module's type tips

```ts title="/src/app.d.ts"
/// <reference types="@sveltepress/vite/types" />
Expand Down

0 comments on commit 4e42804

Please sign in to comment.