Skip to content

Commit

Permalink
feat: change slot definition (#535)
Browse files Browse the repository at this point in the history
* feat: change slot definition

* feat: front matter style data

* chore: update docs

* docs: fix docs

* chore: refactor data tokenizer

* fix: typo

* fix: invalid line detection
  • Loading branch information
farnabaz authored Jul 12, 2021
1 parent 6e33ac4 commit 734fdca
Show file tree
Hide file tree
Showing 14 changed files with 184 additions and 29 deletions.
1 change: 1 addition & 0 deletions docs/content/1.get-started/1.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Checkout the [Deployment](/features/deployment) section when you are ready to pu
## Demo

::video-player{loop playsinline controls}
---
sources:
- src: https://res.cloudinary.com/nuxt/video/upload/q_auto/v1612886404/docus/docus-vercel_wwaryz.webm
type: video/webm
Expand Down
5 changes: 3 additions & 2 deletions docs/content/2.writing/1.my-first-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Using our custom syntax, you can easily add and configure components into your p
... Front-matter 👆

::block-hero
---
cta:
- Get started
- /get-started/installation
Expand All @@ -51,10 +52,10 @@ secondary:
snippet: npx degit nuxtlabs/docus-starter#main docs
---

---title
#title
The next big thing

---description
#description
The favorite package of your favorite package.
::
```
Expand Down
36 changes: 22 additions & 14 deletions docs/content/2.writing/2.syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ There is a few things to know about it:

// YAML Method
::card
---
icon: IconNuxt
description: Harness the full power of Nuxt and the Nuxt ecosystem.
iconClass: 'text-hex-00DC82'
Expand Down Expand Up @@ -86,6 +87,7 @@ There is a few things to know about it:
::

::card
---
icon: IconNuxt
description: Harness the full power of Nuxt and the Nuxt ecosystem.
iconClass: 'text-hex-00DC82'
Expand Down Expand Up @@ -162,13 +164,14 @@ There is a few things to know about it:

```md [Code]
::card
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
::alert
Description slot
::
Expand All @@ -189,13 +192,14 @@ There is a few things to know about it:

::code-block{label="Preview" preview}
::card
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
::alert
Description slot
::
Expand All @@ -209,13 +213,14 @@ There is a few things to know about it:

```md [Code]
::card
icon: IconNuxt
title: A complex card.
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
::alert
Description slot
::
Expand All @@ -224,13 +229,14 @@ There is a few things to know about it:

::code-block{label="Preview" preview}
::card
icon: IconNuxt
title: A complex card.
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
::alert
Description slot
::
Expand All @@ -244,13 +250,14 @@ There is a few things to know about it:

```md [Code]
::card
icon: IconNuxt
title: A complex card.
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
:::alert
Description slot
:::
Expand All @@ -259,13 +266,14 @@ There is a few things to know about it:

::code-block{label="Preview" preview}
::card
icon: IconNuxt
title: A complex card.
---
icon: IconNuxt
title: A complex card.
---

Default slot

---description
#description
:::alert
Description slot
:::
Expand Down
5 changes: 3 additions & 2 deletions docs/content/2.writing/example-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ layout:
---

::block-hero
---
cta:
- Get started
- /get-started/installation
Expand All @@ -16,10 +17,10 @@ secondary:
snippet: npx degit nuxtlabs/docus-starter#main docs
---

---title
#title
The next big thing

---description
#description
The favorite package of your favorite package.
::

Expand Down
2 changes: 2 additions & 0 deletions docs/content/3.features/3.assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Docus includes a **Video Player** component.

```markdown [Markdown]
::video-player{loop playsinline controls}
---
sources:
- src: https://res.cloudinary.com/nuxt/video/upload/q_auto/v1612886404/docus/docus-vercel_wwaryz.webm
type: video/webm
Expand All @@ -87,6 +88,7 @@ Docus includes a **Video Player** component.

::code-block{label="Preview"}
::video-player{loop playsinline controls}
---
sources:
- src: https://res.cloudinary.com/nuxt/video/upload/q_auto/v1612886404/docus/docus-vercel_wwaryz.webm
type: video/webm
Expand Down
1 change: 1 addition & 0 deletions docs/content/3.features/6.extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
```

::alert
---
type: success
---
That's it! Deploy your project and enjoy Plausible.
Expand Down
1 change: 1 addition & 0 deletions docs/content/3.features/7.migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ You might also need to follow the migration guide from [WindiCSS](https://windic
Visit [Configuration](/get-started/configuration) page to update your configuration files with Docus features.

::alert
---
type: success
---

Expand Down
1 change: 1 addition & 0 deletions docs/content/5.templates/1.pre-launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ layout:


::pre-launch-hero
---
title: Awesome startup
description: Pretty long awesome startup description
cta:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/5.templates/2.pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ footer: false
---

::pricing-block

---
plans:
monthly:
base: true
Expand Down
16 changes: 13 additions & 3 deletions docs/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,25 @@ layout.aside: true
---

::block-hero
---
cta:
- Get started
- /get-started/installation
secondary:
- Open on GitHub →
- https://github.com/nuxtlabs/docus
snippet: npx docus-init my-website

---title
---
#title
The Jamstack Website Generator.

---description
#description
Write pages in markdown, use [Vue](https://vuejs.org) components, add style with [Windi CSS](https://windicss.org/) and enjoy the power of [Nuxt](https://nuxtjs.org) with a blazing fast developer experience.
::

::card-grid{title="What's included?"}
::card
---
icon: IconNuxt
description: Harness the full power of Nuxt and the Nuxt ecosystem.
iconClass: 'text-hex-00DC82'
Expand All @@ -36,55 +38,63 @@ Write pages in markdown, use [Vue](https://vuejs.org) components, add style with
::

::card
---
icon: IconVue
title: Vue Components.
description: Use built-in components (or your own!) inside your content.
---
::

::card
---
icon: IconMarkdown
title: Write Markdown.
description: Enjoy the ease and simplicity of Markdown as you write your documentation.
---
::

::card
---
icon: IconWindi
title: Windi CSS.
description: Windi CSS is built in for great developer experience and rapid customization.
---
::

::card
---
icon: IconSSG
title: Static Generation.
description: Generate your documentation as a static website and host it anywhere.
---
::

::card
---
icon: IconLighthouse
title: Lighthouse Optimised.
description: Start with a blazing fast site with a perfect Lighthouse score.
---
::

::card
---
icon: IconZap
title: Smart Generation.
description: Automatically skip a full build if you've only changed Markdown files.
---
::

::card
---
icon: IconPuzzle
title: Extensible.
description: Customize the whole design, or add components using slots - you can make Docus your own.
---
::

::card
---
icon: IconGitHub
title: Open Source.
description: Docus is released under the MIT license and made with love by the NuxtLabs team.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ export const ContainerSequenceSize = 2
export const SectionSequenceSize = 3

export const Codes = {
/**
* '#'
*/
hash: 35,
/**
* '`'
*/
Expand Down
Loading

0 comments on commit 734fdca

Please sign in to comment.