Releases: nuxt/content
v2.3.0
🚀 Enhancements
- module: Introduce
api.baseURL
and deprecatebase
(#1695) - Unique api calls per build (#1705)
- shiki: Expose highlighting utils (#1727)
- document-driven: Introduce
start
andfinish
hooks (#1744) - query: Fully cacheable api (#1752) (This could enable under
stripQueryParameters
experimental flag)
🩹 Fixes
- markdown: Resolve custom shiki languages (#1692)
- clientDB: Disable clientDB if token is set and has falsy value (#1700)
- shiki: Issue with merging multiple themes (#1703)
- query: Invalid response on missing content (#1706)
- test: Typo (#1707)
- markdown: Remove double and trailing dashes from heading ids (#1711)
- ws: Prevent port conflict on running multiple instances (#1721)
- markdown: Remove extra dash from heading id (4c376587)
- Typo (a7912af1)
- build: Invalid cache route handler (ae138a87)
- ContentRendererMarkdown: Recreate vNodes in render function (#1734)
- query: Fallback to default locale if query has no filter on
_locale
(#1748) - module: Put query parameters removal under an experimental flag (#1757)
- Add missing imports (5285db01)
💅 Refactors
- ContentRenderer: Simplify conditions (#1715)
- Shiki: Prepare Shiki highlighter for external usage (#1720)
📖 Documentation
- Update deps (#1684)
- Update studio module (fe55ff28)
- Revert studio module to 0.2.2 (e26ffd01)
- Update studio module (#1686)
- Fix typo (#1693)
- Upgrade studio module (ff2edddc)
- Update code inline (#1730)
- Update module options (#1755)
🏡 Chore
❤️ Contributors
- Farnabaz [email protected]
- Yaël Guilloux [email protected]
- Sébastien Chopin [email protected]
- Levi (Nguyễn Lương Huy) [email protected]
- Nobkd
- Onur Dumangöz
- Baptiste Leproux [email protected]
v2.2.2
🩹 Fixes
- ContentRenderer: Empty content detection (#1653)
- ContentList: Handle props change and fix slots default (#1668)
💅 Refactors
- Improve typings and simplify logic (#1669)
📖 Documentation
- Fix error in ContentQuery where clause example (#1643)
- Update sources (#1664)
- a11y: Use list for nav example (#1670)
🏡 Chore
- Add #content/context virtual file (6e205703)
- No need for virtual file (37e2caf9)
- Upgrade deps (#1682)
❤️ Contributors
- Farnabaz
- Novellac
- Sébastien Chopin (@Atinux)
- Brett Ormsby
v2.2.1
🩹 Fixes
- module: Do not warn when sources is empty (42fffc98)
- module: Set default hostname for dev socket (#1624)
- Document Driven: Layout prefetching (#1637)
- MarkdownParser: Refine content path in anchor link (#1629)
📖 Documentation
🏡 Chore
❤️ Contributors
- Ahad Birang
- Nobkd
- Selemondev
- Sébastien Chopin
v2.2.0
🚀 Enhancements
- document-driven: Support
navigation.redirect
from_dir
files (#1545) - Spa mode (#1525)
- Config for anchor link generation of headings (#1564)
- parser: Introduce
_dir
field in contents (#1613)
🔥 Performance
- build: Build caches before pre-rendering contents (#1530)
🩹 Fixes
- module: Make
documentDriven
configs optional (#1539) - Add missing imports (451b000e)
- Missing imports on preview mode (f9f161b1)
- Use relative
.md
link (#1556) - module: Multi-source array (#1578)
- navigation: Missing composable when navigation is disabled (#1577)
- Ignore built content in preview mode (bc01cde3)
- ClientDB: Drop LocalStorage (7afd857b)
- client-db: Race-condition on multiple calls (c11a4800)
<ContentList>
: Respectquery.path
whenpath
is missing (#1598)<ContentDoc>
: Render blink in SSG (#1600)- Update h3 usage with explicit
defineEventHandler
(#1603) - anchorLinks: Add useRuntimeConfig imports (#1605)
- runtime: Detect 404 api responses in SSG (#1608)
queryContent
: Use path argument as prefix if there is another condition (#1612)
📖 Documentation
- Fix type
client only
->client-only
(#1535) - content-list: Updated query reference and added example (#1548)
- Add search (#1575)
- Update algolia key (9e91948e)
- Cleanup deps (#1582)
- Upgrade Content version (c76c5a75)
- Broken link on Markdown API page (#1588)
- composables: Fix close tag ContentRenderer (#1597)
- Update badge style (49b1c4cc)
- Update cover (ba2aeb45)
- No need to register manually nitro plugin (b6bbb42c)
- Fix nitro plugins link (0259a901)
- Update
findSurround
usage (#1609) - Guidance on using local images (#1617)
🏡 Chore
- Update deps (d3e9aa70)
- Update Docus (428cf8f8)
- Add missing dep (5d29a377)
- Remove preview plugin (558add0c)
❤️ Contributors
- Ahad Birang
- Jan-Henrik Damaschke
- Michel EDIGHOFFER
- Nobkd
- Percy Ma
- Pooya Parsa
- Ramses Garate
- Remiconnesson
- Sai Deepesh
- Sébastien Chopin
v2.1.1
v2.1.0
✨ Highlights
- Introducing the Document Driven mode, an easy and powerful way to create Markdown-based websites!
- Allow using variables in Markdown contents (#1266)
- Improve type support for WebStorm #1288
<Markdown>
is deprecated in favor of new<ContentSlot />
component. The usage is the same as before.
🚀 Enhancements
- types: Provide augmentations for
only
andwithout
(#1200) - types: Expose
MarkdownParsedContent
for improved type generics (#1199) - navigation: Allow passing QueryBuilder or QueryBuilderParams in
fetchNavigation
or<ContentNavigation>
(#1206) - markdown: Allow overwriting plugins (#1226)
- config: Allow ws config (#1249)
- markdown: Support multiple themes for code highlighter (#1251)
- navigation: Allow
_dir.yml
to filter navigation (#1261) - source: Allow overwriting default source (#1273)
- Variable binding (#1266)
- document-driven: Add document-driven as a
@nuxt/content
feature (#1279) - docs: Upgrade docus (3adf4e5)
- use-content-head: Add helper for
<head>
binding (#1295) - document-driven: Add caching layer on client-side (#1312)
- Add
web-types.json
for WebStorm (#1288) - Support navigation field in content and
_dir.yml
(#1328) - Disable document driven with route meta (#1333)
- tailwindcss: Support tailwindcss classes in content (with hmr) (#1351)
- Improve where query types (#1359)
- Export transformers (#1374)
- DocumentDriven configuration (#1378)
<markdown>
: Support fallback default slot (#1405)- Create index for path base search (#1401)
- Pre fetch contents on build (#1411)
- Per-page components (#1429)
- Implement csv parser with
unist/mircomark
stack (#1468) - generate: Use nitro header instead of header link (#1502)
🩹 Fixes
- navigation: Allow navigation opt-out with
navigation: false
(#1208) - types: More accurately represent
ParsedContentMeta
(#1196) - types: Change
QueryBuilderParams
keys to partial (#1203) - ContentQuery: Handle
null
data (#1230) - markdown: Issue with
h1-6
tags (#1223) - markdown: Detect inline component followed non whitespace characters (#1227)
- query: Use exact match for
findOne
(#1224) - query: Surround and only cannot be used at the same time (#1238)
- storage: Warn & ignore files with invalid characters (#1239)
- lint: Fix linting (
ellipsis.vue
) (855bb38) - ContentQuery: Add condition if value is undefined (6a05508)
- mdc-parser: Minor fixes in markdown generation (caf9b83)
- highlight: Preload common languages (#1278)
- query: Handle array fields in
$in
operator (#1277) - document-driven: Update documentDriven feature (#1294)
- highlight: Warn about languages dynamic loading (#1291)
- markdown: Generate depth field in TOC for h5 & h6 (#1296)
- Support layout from defined vue page in DDM (48fc30b)
- ignore: Fix ignore paths injected from the module (97f1d74)
- runtime: ContentRenderer extra props (#1300)
- Remove _theme.yml fetch with doc driven by default (#1310)
- ContentRendererMarkdown: Preload components used in content (#1309)
- markdown: Attributes of span inside headings (#1307)
- Handler files with
index
as substring (#1334) - document-driven: Rendering flash (#1336)
- DocumentDrivenNotFound shall use the layout (d41205a)
- highlight: Remove
@nuxt/kit
from runtime bundle (#1346) - document-driven: Add empty promise for disabled features (#1356)
- hot: Mitigate empty code blocks (hotfix) (a13cca9)
- lint: Fix linting (cbf08ad)
- highlight: Respect
highlight
option (#1372) - Clone
head.meta
before manipulating (#1370) - prose-components: Use html anchor link in headings (#1381)
- Support
components/content
in layers for extends (#1404) - document-driven: Throw 404 error when content is missing (#1394)
- Import
useRoute
(#1408) - document-driven: Only set 404 status on SSR (#1409)
- query: Do not create empty
where
(c71c79b) - content-index: Files in
content
directory has higher priority (#1414) - markdown: Add missing task list class (#1416)
- Make sure
components/content
is on top in layers (#1418) - Remove (now deprecated) template utils (#1423)
- pre-fetch: Support github driver (#1433)
- query: Ensure where is set (10709ee)
- json: Handle parsed content (#1437)
- Avoid mutating
_layers
(#1455) - prerender: Add extension to pre-rendered queries (#1456)
<ContentRenderer>
: Prioritize default slot (#1460)useContentHead
was not respectingog:image
props (#1461)- document-driven: Avoid calling middleware on hash change (5a64f46)
- runtime: Allow to give instance of the remark plugin (#1466)
- useContentHead: Set title only if defined (9b9b648)
- module: Do not add vue files to ignore list (#1476)
<MarkDown>
: Prevent multiple deprecation log (#1497)
💅 Refactors
⚠️ Spellextensions
correctly (#1204)- Use
remark-mdc
package (#1315) - Extract nitro logic from transformers (#1352)
📖 Documentation
- Fix typo (fff00b1)
- Remove config redirect (04fe424)
- Upgrade with latest docus (#1250)
- Update playground (96c161d)
- Update driverOptions (7adaed1)
- Note about rendering content in Get Started (#1255)
- Small typo (1b7fd92)
- get-started: Minor fixes (#1274)
- Add edge releases channel (58cae1d)
- edge-channel: Update edge package name (fe1ebb5)
- Upgrade @nuxt/content (3dc1f25)
- Update document-driven page (90d04bb)
- Move example of doc driven (6426160)
- Improve examples (#1302)
- Fix inline code block (#1303)
- Fix missing slash (#1306)
- Generate blog too (#1311)
- Fix link to document-driven example (6e1ff3b)
- Add template for doc-driven mode (a4ab944)
- Fix the link-id for the surround EN v1 docs ([#1321](#13...
2.0.1
Important notes
Since #1176, we've modified the descending sorting behavior to be -1
instead of 0
to stick with Mongo sort syntax.
- queryContent('/my-directory').sort({ createdAt: 0 })
+ queryContent('/my-directory').sort({ createdAt: -1 })
Features
We added content:file:beforeParse
and content:file:afterParse
hooks to manipulate the data before and after its transformation, you can read more in the advanced section of the documentation. PR #1160 by @farnabaz
Fixes
- fix: ContentQuery
_path
not used properly (#1141) by @GerryWilko in #1143 - fix(frontmatter): issue with windows carriage return by @farnabaz in #1161
- fix: typo that->than, highlight span to improve comprehension by @TheJoeSchr in #1163
- fix(ContentQuery): generate cache key based on props by @farnabaz in #1174
- fix(sort): use
-1
for descending same as mongo syntax by @farnabaz in #1176 - fix(navigation): do not nest home page by @farnabaz in #1179
- fix(sort): convert Date to ISO string by @farnabaz in #1175
- fix(types):
_title
rename totitle
by @cawa-93 in #1181 - fix(query): escape special chars in path by @farnabaz in #1185
Docs
- docs: Update 1.query-content.md by @jhull in #1138
- docs: correct spelling of ContentDoc by @nobkd in #1144
- docs: fix template name by @manniL in #1147
- docs: correctly link to catch-all documentation by @loilo in #1148
- docs: content comment is now link to option docs by @ravenberg in #1150
- docs: typo by @seanghay in #1158
- docs: added information on sitemap generation by @heychazza in #1145
- docs: typo Rendering Doc by @king-11 in #1162
- docs: add
--shamefully-hoist
argument to pnpm install by @Julien-R44 in #1159 - docs: fix querying example route is not defined by @Jclong98 in #1166
- docs: correct path of ContentRenderer source code by @sudhakar-s in #1165
- docs(redirects): remove configuration redirect by @clemcode in #1183
- docs:fixing navigation comments re: default value by @michaeljolley in #1182
Misc
- chore(deps): update devdependency lint-staged to ^12.4.3 by @renovate in #1173
- chore(deps): update all non-major dependencies by @renovate in #1134
- chore(deps): lock file maintenance by @renovate in #1172
- chore(deps): update devdependency lint-staged to ^12.5.0 by @renovate in #1186
New Contributors
- @jhull made their first contribution in #1138
- @nobkd made their first contribution in #1144
- @GerryWilko made their first contribution in #1143
- @loilo made their first contribution in #1148
- @ravenberg made their first contribution in #1150
- @seanghay made their first contribution in #1158
- @king-11 made their first contribution in #1162
- @Julien-R44 made their first contribution in #1159
- @TheJoeSchr made their first contribution in #1163
- @Jclong98 made their first contribution in #1166
- @sudhakar-s made their first contribution in #1165
- @cawa-93 made their first contribution in #1181
- @michaeljolley made their first contribution in #1182
- @heychazza made their first contribution in #1145
Full Changelog: 2.0.0...2.0.1
2.0
@nuxt/content v2
After months of work we are finally officially releasing @nuxt/content v2.
This update main objective was to be fully compatible with Nuxt 3.
It also comes with new features and possibilities to discover:
<ContentDoc>
,<ContentList>
, and other powerful new components- A Markdown syntax made for Vue components (MDC)
- Navigation generation
- Code highlighting with Shiki
In addition to all the current features from @nuxt/content v1:
- Powerful query builder (MongoDB like)
- Blazing fast hot module replacement in development
- Table of contents generation
- Queries into CSV, YAML and JSON(5) content
- Extend with hooks and content plugins
- ...and more
❤️ Thanks
This could not have been possible without the hard work from the @nuxt community!
A special thanks to @farnabaz, @atinux, @pi0, @danielroe, @clemcode who all closely contributed to this release.
1.15.1
v1.15.0
Bug Fixes
- content: add missing
:is="tag"
tonuxt-content-container
(ef7b18d) - content: merge class and style attribute (#905) (d905ffe)
- content: prevent editor extending on typing (#933) (d4dce1e)
- content: update type definition for
QueryBuilder.fetch()
(#825) (4cc224e) - terminal time log information display error (#891) (1f12dd5)