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

feat(docs): upgrade to latest Docus #580

Merged
merged 2 commits into from
Dec 7, 2022
Merged
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
31 changes: 31 additions & 0 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export default defineAppConfig({
docus: {
title: 'Nuxt Tailwind',
layout: 'default',
url: 'https://tailwindcss.nuxtjs.org/',
description: 'Add Tailwind CSS to your Nuxt application in seconds.',
socials: {
twitter: 'nuxt_js',
github: 'nuxt-modules/tailwindcss'
},
image: '/cover.jpg',
header: {
// title: false,
logo: true
},
footer: {
iconLinks: [
{
label: 'Nuxt',
href: 'https://nuxt.com',
icon: 'IconNuxt'
},
{
label: 'Vue Telescope',
href: 'https://vuetelescope.com',
icon: 'IconVueTelescope'
}
]
}
}
})
2 changes: 1 addition & 1 deletion docs/content/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Introduction
description: Add Tailwind CSS to your Nuxt application in seconds.
navigation: false
layout: fluid
layout: page
---

::block-hero
Expand Down
7 changes: 4 additions & 3 deletions docs/content/1.getting-started/1.setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Setup
description: Using Tailwind CSS in your Nuxt project is only one command away ✨
# Setup

Using Tailwind CSS in your Nuxt project is only one command away ✨

---

## Installation
Expand Down
7 changes: 4 additions & 3 deletions docs/content/1.getting-started/2.options.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Options
description: Configure Nuxt Tailwind easily with the `tailwindcss` property.
# Options

Configure Nuxt Tailwind easily with the `tailwindcss` property.

---

```ts [nuxt.config]
Expand Down
7 changes: 4 additions & 3 deletions docs/content/2.tailwind/1.config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Config
description: This module comes with a default Tailwind configuration file to provide the best possible user experience.
# Config

This module comes with a default Tailwind configuration file to provide the best possible user experience.

---

## Default configuration
Expand Down
7 changes: 4 additions & 3 deletions docs/content/2.tailwind/2.viewer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Viewer
description: Visualize your Tailwind configuration with the viewer.
# Viewer

Visualize your Tailwind configuration with the viewer.

---

Nuxt Tailwind will expose a `/_tailwind/` route in development, so that you can quickly visualize your Tailwind configuration with easy copy-pasting (thanks to the awesome [tailwind-config-viewer](https://github.com/rogden/tailwind-config-viewer) package ✨).
Expand Down
7 changes: 4 additions & 3 deletions docs/content/2.tailwind/3.editor-support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Editor Support
description: Improve your development experience with features such as autocomplete, syntax highlighting, and linting.
# Editor Support

Improve your development experience with features such as autocomplete, syntax highlighting, and linting.

---

Tailwind provides an [extension for Visual Studio Code](https://github.com/tailwindlabs/tailwindcss-intellisense), which enables advanced features such as autocomplete, syntax highlighting, and linting.
Expand Down
8 changes: 6 additions & 2 deletions docs/content/3.examples/1.basic.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: Basic Usage
description: Live example of basic usage of Nuxt Tailwind on CodeSandbox.
toc: false
---

# Basic Usage

Live example of basic usage of Nuxt Tailwind on CodeSandbox.

---

Minimal example of a Nuxt project with Tailwind CSS module.

:sandbox{src="https://codesandbox.io/embed/nuxt3-tailwindcss-twowfx"}
8 changes: 6 additions & 2 deletions docs/content/3.examples/2.dark-mode.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: Dark Mode
description: Live example of dark mode with Nuxt Tailwind on CodeSandbox.
toc: false
---

# Dark Mode

Live example of dark mode with Nuxt Tailwind on CodeSandbox.

---

<!-- TODO: Replace with tailwind's native dark mode support. -->

Example with the [tailwindcss-dark-mode](https://github.com/ChanceArthur/tailwindcss-dark-mode) plugin and [@nuxtjs/color-mode](https://github.com/nuxt-community/color-mode-module) module.
Expand Down
9 changes: 7 additions & 2 deletions docs/content/3.examples/3.tailwindui.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
title: Tailwind UI
description: Live example of Tailwind UI plugin with Nuxt Tailwind on CodeSandbox.
toc: false
---

# Tailwind UI

Live example of Tailwind UI plugin with Nuxt Tailwind on CodeSandbox.

---


Example with [Tailwind UI](https://tailwindui.com) plugin with the [Inter](https://rsms.me/inter/) font loaded by [@nuxtjs/google-fonts](https://github.com/nuxt-community/google-fonts-module) module.

:sandbox{src="https://codesandbox.io/embed/nuxt-tailwindui-xy1jk" class="h-[600px]"}
8 changes: 6 additions & 2 deletions docs/content/3.examples/4.postcss-plugin.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: PostCSS Plugins
description: Live example of Nuxt Tailwind with postcss-color-gray plugin.
toc: false
---

# PostCSS Plugins

Live example of Nuxt Tailwind with postcss-color-gray plugin.

---

<!-- TODO: Replace with another postcss plugin as tailwind supports gray colors natively. -->
<!-- TODO: update the link to relevant Nuxt 3 documentation -->

Expand Down
8 changes: 6 additions & 2 deletions docs/content/3.examples/5.daisyui.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: DaisyUI
description: Live example of Nuxt Tailwind with daisyUI and color mode.
toc: false
---

# DaisyUI

Live example of Nuxt Tailwind with daisyUI and color mode.

---

Example with [daisyUI](https://daisyui.com/) and [@nuxtjs/color-mode](https://color-mode.nuxtjs.org/).

Note that the preview may not work, you can open the sandbox on https://stackblitz.com/edit/nuxt-color-mode-daisyui-snrnt9?file=app.vue
Expand Down
7 changes: 4 additions & 3 deletions docs/content/3.examples/6.content.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: '@nuxt/content'
description: 'Discover how powerful it is to use TailwindCSS in @nuxt/content Markdown files!'
# `@nuxt/content`

Discover how powerful it is to use TailwindCSS in @nuxt/content Markdown files!

---

The module supports [@nuxt/content](https://content.nuxtjs.org), meaning you can use Tailwind classes inside your content files with MDC syntax!
Expand Down
14 changes: 11 additions & 3 deletions docs/content/4.community/_changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
---
layout: docs
toc: false
title: Changelog
description: Discover the latest updates.
---

::releases
# Changelog

Discover the latest updates.

---

::alert{type="warning"}
This page is work in progress.

[Visit this page](https://github.com/nuxt-modules/i18n/releases).
::

39 changes: 0 additions & 39 deletions docs/content/_theme.yml

This file was deleted.

24 changes: 2 additions & 22 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
import { defineNuxtConfig } from 'nuxt'
import colors from 'tailwindcss/colors.js'

export default defineNuxtConfig({
extends: ['./node_modules/@docus/docs-theme'],
github: {
owner: 'nuxt-community',
repo: 'tailwindcss-module',
branch: 'main'
},
theme: {},
modules: ['@nuxthq/admin', '@docus/github', 'vue-plausible'],
extends: ['@nuxt-themes/docus'],
modules: ['nuxt-plausible'],
plausible: {
domain: 'tailwindcss.nuxtjs.org'
},
tailwindcss: {
config: {
theme: {
extend: {
colors: {
primary: colors.sky
}
}
}
}
}
})
7 changes: 3 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"license": "MIT",
"homepage": "https://tailwindcss.nuxtjs.org",
"devDependencies": {
"@docus/docs-theme": "npm:@docus/docs-theme-edge@latest",
"@docus/github": "npm:@docus/github-edge@latest",
"nuxt": "^3.0.0-rc.5",
"vue-plausible": "^1.3.1"
"@nuxt-themes/docus": "^1.1.3",
"nuxt": "^3.0.0",
"nuxt-plausible": "latest"
}
}
18 changes: 18 additions & 0 deletions docs/tokens.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineTheme } from 'pinceau'

export default defineTheme({
color: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e'
}
}
})
Loading