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

v2.4.0 #1843

Merged
merged 39 commits into from
Jan 25, 2023
Merged

v2.4.0 #1843

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6f0c622
fix(build): do not register web-socket plugin on non-dev env (#1768)
farnabaz Dec 21, 2022
5a2d287
docs: update badges
atinux Dec 22, 2022
b98cb11
fix(document-driven): prevent `404` error on redirected pages (#1770)
farnabaz Dec 26, 2022
0872868
docs: update outdated link in `sitemap.md` (#1772)
Yuki-Inoue Dec 26, 2022
8624e85
docs: fix broken quickstart link (#1785)
imphil Dec 29, 2022
30c26e3
fix(query): ensure default values always apply to query params (#1778)
farnabaz Dec 29, 2022
3df9f25
docs: fix `ContentRenderer` source link (#1790)
PickleNik Jan 7, 2023
d47083f
docs: fix broken nuxt link (#1789)
VividLemon Jan 7, 2023
486fcd4
fix(examples): layout duplication (#1808)
nobkd Jan 9, 2023
42a31be
docs: fix ContentDoc multi-slot example (#1815)
GanymedeNil Jan 10, 2023
bb33b58
fix(Shiki): sanitize highlighted text (#1818)
danielroe Jan 11, 2023
b40d1a3
feat(shiki-highlighter): improve performance & auto load new language…
farnabaz Jan 11, 2023
1eace98
feat(shiki): highlight excerpt (#1802)
Qwertovsky Jan 12, 2023
0aa922c
feat(markdown): keep meta from fenced code block (#1800)
Qwertovsky Jan 12, 2023
2ba0776
feat(markdown): don't create excerpt if there is no `<!--more-->` (#1…
Qwertovsky Jan 13, 2023
e25eb5b
docs: add note about transformer (#1826)
HigherOrderLogic Jan 16, 2023
fbf6b21
chore(deps): update all non-major dependencies (#1759)
renovate[bot] Jan 16, 2023
7211492
chore(deps): lock file maintenance (#1764)
renovate[bot] Jan 16, 2023
b4750ed
chore: fix typos
atinux Jan 17, 2023
541cca9
fix(markdown-link): replacing `blank` prop with `target` (#1828)
arashsheyda Jan 18, 2023
ee6eb99
fix(highlighter): define missing env in Vite (#1830)
farnabaz Jan 18, 2023
1cc86bd
fix(shiki): issue with JSON import (#1824)
SheetJSDev Jan 19, 2023
f77d770
docs: update logo
atinux Jan 19, 2023
1cb91f5
chore: update favicon
atinux Jan 19, 2023
67c9fcf
fix(markdown): XSS Prevention (#1832)
farnabaz Jan 20, 2023
3465ea7
fix: handle uri encoded `_path `query (#1794)
hannoeru Jan 20, 2023
b2eb178
chore(deps): update all non-major dependencies (#1827)
renovate[bot] Jan 20, 2023
383f707
fix: add `og:title,url,description` meta tags and prefix `og:image` w…
danielroe Jan 20, 2023
6a1e854
fix(navigation): missing import
farnabaz Jan 23, 2023
1f7d3a2
fix(navigation): missing import
farnabaz Jan 23, 2023
9923502
test: disable `autoImport` (#1842)
farnabaz Jan 23, 2023
f319749
chore(deps): lock file maintenance (#1840)
renovate[bot] Jan 23, 2023
cb4fa76
chore(deps): update all non-major dependencies (#1835)
renovate[bot] Jan 23, 2023
d2e2fba
fix(markdown): images src with `baseURL` (#1833)
farnabaz Jan 24, 2023
af1c5cd
chore(deps): update all non-major dependencies (#1845)
renovate[bot] Jan 25, 2023
51fca2a
chore(deps): revert dependencies
farnabaz Jan 25, 2023
bc04b94
chore(deps): update all non-major dependencies (#1848)
renovate[bot] Jan 25, 2023
9a565fd
chore: add release-it
farnabaz Jan 25, 2023
41e3ea8
Release 2.4.0
farnabaz Jan 25, 2023
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
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Volta][volta-src]][volta-href]

# Nuxt Content

Expand Down Expand Up @@ -41,12 +42,15 @@ Nuxt 2 is supported with Content v1, documentation is on https://content.nuxtjs.
[MIT](./LICENSE) - Made with 💚


[npm-version-src]: https://img.shields.io/npm/v/@nuxt/content/latest.svg?style=flat&colorA=002438&colorB=28CF8D
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/content/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/@nuxt/content

[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxt/content.svg?style=flat&colorA=002438&colorB=28CF8D
[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxt/content.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/@nuxt/content

[license-src]: https://img.shields.io/github/license/nuxt/content.svg?style=flat&colorA=002438&colorB=28CF8D
[license-src]: https://img.shields.io/github/license/nuxt/content.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://github.com/nuxt/content/blob/main/LICENSE


[volta-src]: https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg
[volta-href]: https://volta.net/nuxt/content?utm_source=readme_nuxt_content
5 changes: 4 additions & 1 deletion docs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default defineAppConfig({
github: {
root: 'docs/content',
edit: true,
releases: true
releases: true,
owner: 'nuxt',
repo: 'content',
branch: 'main'
},
cover: {
src: '/cover.jpg',
Expand Down
18 changes: 14 additions & 4 deletions docs/components/content/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<template>
<svg height="24px" viewBox="0 0 126 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6009 1.34267c-.9666-1.65485-3.3832-1.65485-4.3499 0L.71619 19.3781c-.96664 1.6549.24165 3.7234 2.17494 3.7234h8.22407c-.8261-.7188-1.13199-1.9623-.5068-3.0293L18.587 6.45475l-2.9861-5.11208Z" fill="#80EEC0" />
<path d="M22.276 5.29879c.8-1.35398 2.7999-1.35398 3.5999 0L34.5944 20.055c.8 1.354-.2 3.0465-1.7999 3.0465h-17.437c-1.5999 0-2.6-1.6925-1.8-3.0465L22.276 5.29879Z" fill="#00DC82" />
<path d="M49.5744 23.0432c3.8655 0 6.7421-2.2261 7.0567-5.4866h-2.9665c-.2697 1.7089-1.9327 2.9007-4.0902 2.9007-2.7418 0-4.8094-1.8888-4.8094-5.4641 0-3.5753 2.0676-5.48663 4.8094-5.48663 2.1125 0 3.7756 1.19173 4.0003 2.92323h3.1014c-.427-3.26053-3.3036-5.48664-7.1017-5.48664-4.1127 0-7.7984 2.6983-7.7984 8.05004 0 5.3517 3.6183 8.05 7.7984 8.05Zm14.2834 0c3.4385 0 5.9104-2.4735 5.9104-5.8464s-2.4719-5.8464-5.9104-5.8464c-3.461 0-5.9329 2.4735-5.9329 5.8464s2.4719 5.8464 5.9329 5.8464Zm0-2.3836c-1.8878 0-3.1464-1.4166-3.1464-3.4628 0-2.0463 1.2586-3.4628 3.1464-3.4628 1.8653 0 3.124 1.4165 3.124 3.4628 0 2.0462-1.2587 3.4628-3.124 3.4628Zm10.5403 2.2037v-6.1837c0-1.664 1.0787-2.8782 2.6295-2.8782 1.4156 0 2.3598 1.0794 2.3598 2.6309v6.431h2.764v-7.0157c0-2.6533-1.6629-4.4972-4.2251-4.4972-1.618 0-2.8991.6971-3.5282 1.9338v-1.7539h-2.764v11.333h2.764Zm11.2487-11.333h-2.2252v2.3161h2.2252v5.0594c0 2.5184 1.6181 3.9575 4.09 3.9575h1.8205v-2.3386h-1.506c-1.0332 0-1.6404-.5846-1.6404-1.7314v-4.9469h3.1464v-2.3161h-3.1464V8.11242h-2.7641v3.41788Zm15.2492 7.5553c-.292 1.0793-1.2134 1.664-2.629 1.664-1.7532 0-2.9216-1.1693-3.124-2.9906h8.36c.023-.2249.045-.5622.045-.9445 0-2.6983-1.707-5.4641-5.5059-5.4641-3.7082 0-5.551 2.8108-5.551 5.8014 0 2.9682 2.0677 5.8914 5.7759 5.8914 2.787 0 4.899-1.5516 5.326-3.9576h-2.697Zm-2.8539-5.6664c1.6405 0 2.6299 1.0793 2.7419 2.5184h-5.5732c.2921-1.709 1.2805-2.5184 2.8313-2.5184Zm10.1759 9.4441v-6.1837c0-1.664 1.079-2.8782 2.63-2.8782 1.416 0 2.36 1.0794 2.36 2.6309v6.431h2.764v-7.0157c0-2.6533-1.663-4.4972-4.225-4.4972-1.618 0-2.899.6971-3.529 1.9338v-1.7539h-2.764v11.333h2.764Zm11.249-11.333h-2.225v2.3161h2.225v5.0594c0 2.5184 1.618 3.9575 4.09 3.9575h1.821v-2.3386h-1.506c-1.034 0-1.641-.5846-1.641-1.7314v-4.9469h3.147v-2.3161h-3.147V8.11242h-2.764v3.41788Z" fill="currentColor" />
<svg
height="24px"
viewBox="0 0 126 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill="#00DC82"
d="M19.8732 23.567h13.1686c.4183.0001.8292-.1069 1.1914-.3101.3622-.2033.6629-.4956.872-.8476.209-.352.319-.7513.3188-1.1577-.0002-.4064-.1105-.8056-.3198-1.1574L26.2605 5.21014c-.209-.35193-.5097-.64418-.8719-.84737-.3621-.2032-.7729-.31017-1.1911-.31017s-.829.10697-1.1912.31017c-.3621.20319-.6628.49544-.8718.84737l-2.2613 3.80829-4.4212-7.44699c-.2092-.3519-.51-.64411-.8723-.84727-.3622-.20316-.7731-.3101-1.1913-.3101-.4183 0-.8292.10694-1.1914.3101-.3623.20316-.6631.49537-.8723.84727L.31986 20.0942C.1105 20.446.00018 20.8452 0 21.2516c-.00018.4064.10978.8057.31882 1.1577.20905.352.5098.6443.87202.8476.36221.2032.77312.3102 1.19138.3101h8.26618c3.2751 0 5.6904-1.3979 7.3524-4.125l4.0349-6.7899 2.1611-3.63367L30.683 19.9333h-8.6473l-2.1625 3.6337Zm-9.3596-3.6374-5.7687-.0013 8.6473-14.55231 4.3147 7.27611-2.8889 4.8633c-1.1037 1.7695-2.3575 2.4142-4.3044 2.4142Z"
/>
<path
d="M49.5744 23.0432c3.8655 0 6.7421-2.2261 7.0567-5.4866h-2.9665c-.2697 1.7089-1.9327 2.9007-4.0902 2.9007-2.7418 0-4.8094-1.8888-4.8094-5.4641 0-3.5753 2.0676-5.48663 4.8094-5.48663 2.1125 0 3.7756 1.19173 4.0003 2.92323h3.1014c-.427-3.26053-3.3036-5.48664-7.1017-5.48664-4.1127 0-7.7984 2.6983-7.7984 8.05004 0 5.3517 3.6183 8.05 7.7984 8.05Zm14.2834 0c3.4385 0 5.9104-2.4735 5.9104-5.8464s-2.4719-5.8464-5.9104-5.8464c-3.461 0-5.9329 2.4735-5.9329 5.8464s2.4719 5.8464 5.9329 5.8464Zm0-2.3836c-1.8878 0-3.1464-1.4166-3.1464-3.4628 0-2.0463 1.2586-3.4628 3.1464-3.4628 1.8653 0 3.124 1.4165 3.124 3.4628 0 2.0462-1.2587 3.4628-3.124 3.4628Zm10.5403 2.2037v-6.1837c0-1.664 1.0787-2.8782 2.6295-2.8782 1.4156 0 2.3598 1.0794 2.3598 2.6309v6.431h2.764v-7.0157c0-2.6533-1.6629-4.4972-4.2251-4.4972-1.618 0-2.8991.6971-3.5282 1.9338v-1.7539h-2.764v11.333h2.764Zm11.2487-11.333h-2.2252v2.3161h2.2252v5.0594c0 2.5184 1.6181 3.9575 4.09 3.9575h1.8205v-2.3386h-1.506c-1.0332 0-1.6404-.5846-1.6404-1.7314v-4.9469h3.1464v-2.3161h-3.1464V8.11242h-2.7641v3.41788Zm15.2492 7.5553c-.292 1.0793-1.2134 1.664-2.629 1.664-1.7532 0-2.9216-1.1693-3.124-2.9906h8.36c.023-.2249.045-.5622.045-.9445 0-2.6983-1.707-5.4641-5.5059-5.4641-3.7082 0-5.551 2.8108-5.551 5.8014 0 2.9682 2.0677 5.8914 5.7759 5.8914 2.787 0 4.899-1.5516 5.326-3.9576h-2.697Zm-2.8539-5.6664c1.6405 0 2.6299 1.0793 2.7419 2.5184h-5.5732c.2921-1.709 1.2805-2.5184 2.8313-2.5184Zm10.1759 9.4441v-6.1837c0-1.664 1.079-2.8782 2.63-2.8782 1.416 0 2.36 1.0794 2.36 2.6309v6.431h2.764v-7.0157c0-2.6533-1.663-4.4972-4.225-4.4972-1.618 0-2.899.6971-3.529 1.9338v-1.7539h-2.764v11.333h2.764Zm11.249-11.333h-2.225v2.3161h2.225v5.0594c0 2.5184 1.618 3.9575 4.09 3.9575h1.821v-2.3386h-1.506c-1.034 0-1.641-.5846-1.641-1.7314v-4.9469h3.147v-2.3161h-3.147V8.11242h-2.764v3.41788Z"
fill="currentColor"
/>
</svg>
</template>
2 changes: 1 addition & 1 deletion docs/content/2.get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can start playing with Nuxt Content in your browser using our online sandbox
Before getting started, please **make sure to have installed the recommended setup**:

#content
* Follow the [Nuxt 3 Prerequisites](https://v3.nuxtjs.org/getting-started/quick-start#prerequisites)
* Follow the [Nuxt 3 Prerequisites](https://nuxt.com/docs/getting-started/installation#prerequisites)

* Download the [VS Code **MDC Extension**](https://marketplace.visualstudio.com/items?itemName=Nuxt.mdc)
::
Expand Down
2 changes: 2 additions & 0 deletions docs/content/3.guide/1.writing/2.markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Full amount of content beyond the more divider.

Description property will contain the excerpt content unless defined within the Front Matter props.

If there is no `<!--more-->` divider in the text then excerpt is undefined.

Example variables will be injected into the document:

```json
Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.guide/2.displaying/1.rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Head over to the [API section](/api/components/content-doc) to see the complete

## `<ContentRenderer />`

The `<ContentRenderer>` component renders the body of a Markdown document returned by [`queryContent()`](/guide/displaying/querying) in a rich-text format. It fallbacks to rendering the content in a `<pre>`{lang="html"} tag if the content is not Markdown ([:icon{name="fa-brands:github" class="inline-block w-4"} source code](https://github.com/nuxt/content/blob/main/src/runtime/components/ContentRenderer.ts)).
The `<ContentRenderer>` component renders the body of a Markdown document returned by [`queryContent()`](/guide/displaying/querying) in a rich-text format. It fallbacks to rendering the content in a `<pre>`{lang="html"} tag if the content is not Markdown ([:icon{name="fa-brands:github" class="inline-block w-4"} source code](https://github.com/nuxt/content/blob/main/src/runtime/components/ContentRenderer.vue)).

`<ContentRenderer>` accepts a `value` prop containing the data.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.guide/3.recipes/1.sitemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This can be created by utilising the `sitemap` library, which can be installed a

## Server Route

We will be utilising the [server routes](https://v3.nuxtjs.org/guide/features/server-routes) available within Nuxt, and to do so you'll need to create the `server/` directory within your website's root directly.
We will be utilising the [server routes](https://nuxt.com/docs/guide/directory-structure/server#server-routes) available within Nuxt, and to do so you'll need to create the `server/` directory within your website's root directly.

Once this is done, create a `routes/` directory inside this, and add a `sitemap.xml.ts` file, this will translate to `/sitemap.xml`.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.guide/4.deploy/1.node-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Generated files are ready-to-run on Node environment.
node .output/server/index.mjs
```

Read more about [Node Server deploy](https://v3.nuxtjs.org/guide/deploy/node-server) on Nuxt official docs.
Read more about [Node Server deploy](https://nuxt.com/docs/getting-started/deployment#nodejs-server) on Nuxt official docs.
6 changes: 4 additions & 2 deletions docs/content/4.api/1.components/2.content-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ An explicit `path`{lang=ts} can be given to the component.
```html [pages/index.vue]
<template>
<main>
<ContentList path="/articles" v-slot="{ list }">
<!-- ...default slot -->
<ContentList path="/articles">
<template v-slot="{ list }">
<!-- ...default slot -->
</template>
<template #not-found>
<p>No articles found.</p>
</template>
Expand Down
15 changes: 13 additions & 2 deletions docs/content/4.api/1.components/7.prose.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To overwrite a prose component, create a component with the same name in your pr
::code-group

```markdown [Code]
```javascript
```javascript[file.js]{4-6,7} meta-info=val
export default () => {
console.log('Code block')
}
Expand All @@ -54,7 +54,7 @@ To overwrite a prose component, create a component with the same name in your pr

::code-block{label="Preview"}

```javascript
```javascript[file.js]{4-6,7}
export default () => {
console.log('Code block')
}
Expand All @@ -64,6 +64,17 @@ To overwrite a prose component, create a component with the same name in your pr

::

Component properties will be:
```json
{
code: "export default () => {\n console.log('Code block')\n}"
language: "javascript"
filename: "file.js"
highlights: [4, 5, 6, 7]
meta: "meta-info=val"
}
```

Check out the [highlight options](/api/configuration#highlight) for more about the syntax highlighting.

## `ProseCodeInline`
Expand Down
2 changes: 2 additions & 0 deletions docs/content/4.api/4.advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ import MyModule from './my-module'

export default defineNuxtConfig({
modules: [
// always put it before @nuxt/content because the transformers
// needs to be loaded before transformation occurs
MyModule,
'@nuxt/content'
]
Expand Down
9 changes: 5 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"generate": "nuxi generate"
},
"devDependencies": {
"@nuxt-themes/docus": "^1.1.5",
"@nuxthq/studio": "^0.3.5",
"@nuxtlabs/github-module": "^1.5.4",
"@docsearch/js": "^3.3.2",
"@nuxt-themes/docus": "^1.6.0",
"@nuxthq/studio": "^0.6.5",
"@nuxtlabs/github-module": "^1.6.1",
"monaco-editor-core": "^0.34.1",
"nuxt": "v3.0.0",
"nuxt": "3.1.0",
"vue-plausible": "^1.3.2"
}
}
Binary file modified docs/public/favicon.ico
Binary file not shown.
Loading