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: new docs #2740

Merged
merged 70 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
13fd55b
feat: new docs
MuhammadM1998 Jan 28, 2024
c1e6d9a
chore: ignore docs from linting
MuhammadM1998 Jan 28, 2024
3e9d87e
chore: Nuxt UI Pro + Nuxt Content starter
MuhammadM1998 Jan 28, 2024
820b55e
chore: refresh lockfile
MuhammadM1998 Jan 28, 2024
f0abae2
chore: update app metadata
MuhammadM1998 Jan 28, 2024
846ef5a
chore: update header title
MuhammadM1998 Jan 28, 2024
c8fad3a
refactor: update index page
MuhammadM1998 Jan 28, 2024
700dcd2
feat: the logo
MuhammadM1998 Jan 28, 2024
1d4fc2e
feat: navigation links
MuhammadM1998 Jan 28, 2024
2828196
docs: installation page
MuhammadM1998 Jan 28, 2024
3f09774
docs: add getting started icon
MuhammadM1998 Jan 28, 2024
e390f88
docs: update installation page
MuhammadM1998 Jan 28, 2024
de98fcf
docs: usage page
MuhammadM1998 Jan 28, 2024
6931d42
docs: add /guide content
MuhammadM1998 Jan 28, 2024
8d8f749
style: add '.env' file icons
MuhammadM1998 Jan 28, 2024
3e27f8f
chore: spacing
MuhammadM1998 Jan 29, 2024
5222f27
chore: change 'alert' to 'callout'
MuhammadM1998 Jan 29, 2024
c2e4019
fix: pin '@nuxt/content' to 2.8.2
MuhammadM1998 Jan 29, 2024
c7213f2
docs: options page
MuhammadM1998 Jan 29, 2024
8dc21d6
docs: api
MuhammadM1998 Jan 29, 2024
2d188b9
docs: roadmap page
MuhammadM1998 Jan 29, 2024
4145a06
chore: add ts-expect-error
MuhammadM1998 Jan 29, 2024
50a32c0
docs: v7
MuhammadM1998 Jan 29, 2024
9515798
chore: remove duplicate title
MuhammadM1998 Jan 29, 2024
dac5052
refactor: separate v8 & v7 docs pages
MuhammadM1998 Jan 29, 2024
aa7e816
style: disallow opening multiple accordions
MuhammadM1998 Jan 29, 2024
07c5a5e
Merge branch 'main' of github.com:nuxt-modules/i18n
MuhammadM1998 Jan 29, 2024
9c81b21
chore: refresh lockfile
MuhammadM1998 Jan 29, 2024
5ca2966
chore: add oss license
atinux Jan 29, 2024
29e59f7
feat: implement VersionSelect to switch module versions
MuhammadM1998 Jan 30, 2024
4dddc6f
refactor: move all docs under '/docs' route
MuhammadM1998 Jan 30, 2024
8100a77
docs: update homepage links
MuhammadM1998 Jan 30, 2024
37b17f1
refactor: match page name to its title
MuhammadM1998 Jan 30, 2024
f65b924
feat: add code group in homepage
MuhammadM1998 Jan 30, 2024
14f0777
feat: dynamically show full or truncate i18n ero title
MuhammadM1998 Jan 30, 2024
ce854cc
feat: og image
MuhammadM1998 Jan 30, 2024
cf41253
refactor: remove redundant props
MuhammadM1998 Jan 30, 2024
955cff3
chore: cleanup
MuhammadM1998 Jan 30, 2024
b17d398
refactor: cleanup
MuhammadM1998 Jan 30, 2024
4afe997
refactor: remove empty 'logo' object
MuhammadM1998 Jan 30, 2024
ed9228e
chore: remove redundant 'viewport' as it's automatically added
MuhammadM1998 Jan 30, 2024
b07c233
refactor: set `titleTemplate` in app.vue
MuhammadM1998 Jan 30, 2024
ffa28b9
refactor: `usePageMeta` composable
MuhammadM1998 Jan 30, 2024
6b3bbc7
chore: avoid using single-name components
MuhammadM1998 Jan 30, 2024
9b772f1
refactor: set header 'links' props to optional
MuhammadM1998 Jan 30, 2024
dc1e67f
refactor: add 'ts-expect-error'
MuhammadM1998 Jan 30, 2024
74de993
refactor: remove redundant 'v7' page
MuhammadM1998 Jan 30, 2024
27a7a5b
chore: rename first pages to index
MuhammadM1998 Feb 2, 2024
8260bdb
fix: broken link
MuhammadM1998 Feb 2, 2024
eef5944
Merge branch 'nuxt-modules:main' into main
MuhammadM1998 Feb 2, 2024
4f99c7f
chore: update relative links
MuhammadM1998 Feb 2, 2024
afa7c39
Merge branch 'main' of personal:MuhammadM1998/i18n
MuhammadM1998 Feb 2, 2024
c0668c4
chore: fix broken links
MuhammadM1998 Feb 2, 2024
5d1ebc6
Merge branch 'main' of github.com:nuxt-modules/i18n
MuhammadM1998 Feb 2, 2024
8064496
chore: add `strict-peer-dependencies` to docs npmrc
MuhammadM1998 Feb 6, 2024
039cb75
Merge branch 'nuxt-modules:main' into main
MuhammadM1998 Feb 6, 2024
1a0df61
chore: remove redundant 'vue' resolution
MuhammadM1998 Feb 6, 2024
d9258ac
chore: add 'shamefully-hoist' & 'strict-peer-dependencies' to root .n…
MuhammadM1998 Feb 6, 2024
ea38003
chore: bump nuxt content and ui pro
MuhammadM1998 Feb 6, 2024
7e03522
chore: organize a bit
MuhammadM1998 Feb 6, 2024
9366f6b
chore: remove 'asciidoc name from codeblocks
MuhammadM1998 Feb 6, 2024
dc4299a
chore: replace 'env' with 'shell'
MuhammadM1998 Feb 6, 2024
f0917ad
fix: 'env' icons are not rendered
MuhammadM1998 Feb 6, 2024
466d402
Merge branch 'main' into main
MuhammadM1998 Feb 8, 2024
4760ccd
chore: refresh lockfile
MuhammadM1998 Feb 8, 2024
a042007
chore: highlight `jsonc` code blocks
MuhammadM1998 Feb 8, 2024
80e7015
Merge branch 'main' of personal:MuhammadM1998/i18n; branch 'main' of …
MuhammadM1998 Feb 12, 2024
b94dd22
Merge branch 'main' of github.com:nuxt-modules/i18n
MuhammadM1998 Feb 13, 2024
55f3027
Merge branch 'nuxt-modules:main' into main
MuhammadM1998 Feb 13, 2024
6bb2aae
Merge branch 'main' of github.com:nuxt-modules/i18n
MuhammadM1998 Feb 14, 2024
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
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
shell-emulator=true
shamefully-hoist=true
strict-peer-dependencies=false
13 changes: 13 additions & 0 deletions docs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
8 changes: 5 additions & 3 deletions docs/.env.example
100755 β†’ 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Create one with no scope selected on https://github.com/settings/tokens/new
# This token is used for fetching the repository releases.
GITHUB_TOKEN=
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
NUXT_UI_PRO_LICENSE=

# Public URL, used for OG Image when running nuxt generate
NUXT_PUBLIC_SITE_URL=
33 changes: 24 additions & 9 deletions docs/.gitignore
100755 β†’ 100644
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
node_modules
*.iml
.idea
*.log*
# Nuxt dev/build outputs
.output
.data
.nuxt
.vscode
.DS_Store
coverage
.nitro
.cache
dist
sw.*

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.output
.env.*
!.env.example

# VSC
.history
2 changes: 2 additions & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
125 changes: 125 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
![nuxt-ui-pro-docs-template](https://github.com/nuxt-ui-pro/docs/assets/904724/67fc15a7-92f6-4566-95b9-fe099012473c)

# Nuxt UI Pro - Docs template

[![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro)
[![Nuxt Studio](https://img.shields.io/badge/Open%20in%20Nuxt%20Studio-18181B?&logo=nuxt.js&logoColor=3BB5EC)](https://nuxt.studio/themes/docs)

- [Live demo](https://nuxt-ui-pro-template-docs.vercel.app/)
- [Play on Stackblitz](https://stackblitz.com/github/nuxt-ui-pro/docs)
- [Documentation](https://ui.nuxt.com/pro/guide)
- [Clone on Nuxt Studio](https://nuxt.studio/themes/docs)

## Quick Start

```bash [Terminal]
npx nuxi init -t github:nuxt-ui-pro/docs
```

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

## Nuxt Studio integration

Add `@nuxthq/studio` dependency to your package.json:

```bash
# npm
npm install --save-dev @nuxthq/studio

# pnpm
pnpm add -D @nuxthq/studio

# yarn
yarn add -D @nuxthq/studio

# bun
bun add -d @nuxthq/studio
```

Add this module to your `nuxt.config.ts`:

```ts
export default defineNuxtConfig({
...
modules: [
...
'@nuxthq/studio'
]
})
```

Read more on [Nuxt Studio docs](https://nuxt.studio/docs/projects/setup).

## Renovate integration

Install [Renovate GitHub app](https://github.com/apps/renovate/installations/select_target) on your repository and you are good to go.
95 changes: 52 additions & 43 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
export default defineAppConfig({
docus: {
title: '@nuxtjs/i18n',
description: 'I18n (Internationalization) module for Nuxt',
url: 'https://i18n.nuxtjs.org',
layout: 'default',
image: '/cover.png',
socials: {
github: 'nuxt-modules/i18n'
},
github: {
branch: 'main',
repo: 'i18n',
owner: 'nuxt-modules',
dir: 'docs/content',
edit: true
},
aside: {
level: 1
},
cover: {
src: '/cover.png',
alt: 'I18n module for Nuxt'
},
header: {
logo: true,
showLinkIcon: false
},
ui: {
primary: 'green',
gray: 'slate',
footer: {
credits: {
icon: 'IconDocus',
text: 'Powered by Docus',
href: 'https://docus.com'
},
icons: [
{
label: 'Nuxt',
href: 'https://nuxt.com',
component: 'IconNuxt'
},
{
label: 'Vue Telescope',
href: 'https://vuetelescope.com',
component: 'IconVueTelescope'
bottom: {
left: 'text-sm text-gray-500 dark:text-gray-400',
wrapper: 'border-t border-gray-200 dark:border-gray-800'
}
},
content: {
prose: {
code: {
icon: {
env: 'vscode-icons:file-type-dotenv'
}
}
]
}
}
},
seo: { siteName: '@nuxtjs/i18n' },
header: {
search: true,
colorMode: true,
links: [
{
icon: 'i-simple-icons-github',
to: 'https://github.com/nuxt-modules/i18n',
target: '_blank',
'aria-label': 'Nuxt i18n module'
}
]
},
footer: {
credits: `Copyright Β© ${new Date().getFullYear()}`,
colorMode: false,
links: [
{
icon: 'i-simple-icons-nuxtdotjs',
to: 'https://nuxt.com',
target: '_blank',
'aria-label': 'Nuxt Website'
},
{
icon: 'i-simple-icons-github',
to: 'https://github.com/nuxt-modules/i18n',
target: '_blank',
'aria-label': 'Nuxt i18n module'
}
]
},
toc: {
title: 'Table of Contents',
bottom: {
edit: 'https://github.com/nuxt-modules/i18n/docs/edit/main/content'
}
}
})
58 changes: 58 additions & 0 deletions docs/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<script setup lang="ts">
// @ts-expect-error This is because we're using Nuxt Content v2.8.2 instead of the new version which includes these types. We're using the old version because the latest has issues with highlighting
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import type { PageLink } from '#ui-pro/types'

// Seo
const { seo } = useAppConfig()
useHead({ htmlAttrs: { lang: 'en' }, link: [{ rel: 'icon', href: '/favicon.ico' }] })
useSeoMeta({
titleTemplate: `%s - ${seo.siteName}`,
ogSiteName: seo.siteName,
twitterCard: 'summary_large_image'
})

// Navigation Data
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
provide('navigation', navigation)

// Search
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
})

// Header
const route = useRoute()
const links: PageLink[] = [
{
label: 'Docs',
to: `/docs/getting-started`,
icon: 'i-heroicons-rocket-launch',
active: route.path.startsWith('/docs')
},
{
label: 'Roadmap',
to: '/roadmap',
icon: 'i-heroicons-map'
}
]
</script>

<template>
<div>
<TheHeader :links="links" />

<NuxtLayout>
<NuxtPage />
</NuxtLayout>

<TheFooter />

<ClientOnly>
<LazyUDocsSearch :files="files" :navigation="navigation" :links="links" />
</ClientOnly>

<UNotifications />
</div>
</template>
Loading