From e29fa93086dd19cc708b9b057ff32d8ec467dfdf Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Fri, 17 Nov 2023 16:10:18 +0100 Subject: [PATCH] docs(new): ui pro docs --- .github/workflows/studio.yml | 82 ---------- docs-old/.eslintignore | 4 + docs-old/.eslintrc.cjs | 8 + docs-old/.gitignore | 12 ++ docs-old/.npmrc | 2 + docs-old/README.md | 57 +++++++ docs-old/app.config.ts | 57 +++++++ {docs => docs-old}/components/Logo.vue | 0 docs-old/components/content/Releases.vue | 19 +++ docs-old/components/content/VoltaBoard.vue | 14 ++ {docs => docs-old}/content/1.index.md | 0 docs-old/content/2.get-started.md | 151 ++++++++++++++++++ docs-old/content/3.authentication.md | 80 ++++++++++ {docs => docs-old}/content/3.usage/_dir.yml | 0 .../content/3.usage/composables/_dir.yml | 0 .../3.usage/composables/useSupabaseClient.md | 0 .../3.usage/composables/useSupabaseUser.md | 0 .../services/1.serverSupabaseClient.md | 0 .../services/2.serverSupabaseServiceRole.md | 0 .../3.usage/services/3.serverSupabaseUser.md | 0 .../content/3.usage/services/_dir.yml | 0 {docs => docs-old}/content/4.demo.md | 0 {docs => docs-old}/content/5.changelog.md | 0 {docs => docs-old}/content/6.roadmap.md | 0 {docs => docs-old}/nuxt.config.ts | 0 {docs => docs-old}/package.json | 0 {docs => docs-old}/pnpm-lock.yaml | 0 {docs => docs-old}/public/cover.jpg | Bin {docs => docs-old}/public/favicon.ico | Bin {docs => docs-old}/renovate.json | 0 {docs => docs-old}/tokens.config.ts | 0 {docs => docs-old}/tsconfig.json | 0 {docs => docs-old}/utils/index.ts | 0 docs/.env.example | 2 + docs/.eslintignore | 2 +- docs/.eslintrc.cjs | 12 +- docs/.gitignore | 33 ++-- docs/.nuxtrc | 3 + docs/README.md | 110 ++++++++++--- docs/app.config.ts | 141 ++++++++++------ docs/app.vue | 48 ++++++ docs/components/Footer.vue | 23 +++ docs/components/Header.vue | 45 ++++++ docs/components/OgImage/OgImageDocs.vue | 29 ++++ docs/content/2.get-started.md | 4 +- docs/content/3.authentication.md | 6 +- docs/content/4.usage/_dir.yml | 2 + docs/content/4.usage/composables/_dir.yml | 1 + .../4.usage/composables/useSupabaseClient.md | 113 +++++++++++++ .../4.usage/composables/useSupabaseUser.md | 41 +++++ .../services/1.serverSupabaseClient.md | 42 +++++ .../services/2.serverSupabaseServiceRole.md | 38 +++++ .../4.usage/services/3.serverSupabaseUser.md | 44 +++++ docs/content/4.usage/services/_dir.yml | 1 + docs/content/5.demo.md | 23 +++ docs/content/6.changelog.md | 10 ++ docs/content/7.roadmap.md | 7 + docs/content/index.yml | 54 +++++++ docs/error.vue | 49 ++++++ docs/layouts/docs.vue | 21 +++ 60 files changed, 1218 insertions(+), 172 deletions(-) delete mode 100644 .github/workflows/studio.yml create mode 100644 docs-old/.eslintignore create mode 100644 docs-old/.eslintrc.cjs create mode 100644 docs-old/.gitignore create mode 100644 docs-old/.npmrc create mode 100644 docs-old/README.md create mode 100644 docs-old/app.config.ts rename {docs => docs-old}/components/Logo.vue (100%) create mode 100644 docs-old/components/content/Releases.vue create mode 100644 docs-old/components/content/VoltaBoard.vue rename {docs => docs-old}/content/1.index.md (100%) create mode 100644 docs-old/content/2.get-started.md create mode 100644 docs-old/content/3.authentication.md rename {docs => docs-old}/content/3.usage/_dir.yml (100%) rename {docs => docs-old}/content/3.usage/composables/_dir.yml (100%) rename {docs => docs-old}/content/3.usage/composables/useSupabaseClient.md (100%) rename {docs => docs-old}/content/3.usage/composables/useSupabaseUser.md (100%) rename {docs => docs-old}/content/3.usage/services/1.serverSupabaseClient.md (100%) rename {docs => docs-old}/content/3.usage/services/2.serverSupabaseServiceRole.md (100%) rename {docs => docs-old}/content/3.usage/services/3.serverSupabaseUser.md (100%) rename {docs => docs-old}/content/3.usage/services/_dir.yml (100%) rename {docs => docs-old}/content/4.demo.md (100%) rename {docs => docs-old}/content/5.changelog.md (100%) rename {docs => docs-old}/content/6.roadmap.md (100%) rename {docs => docs-old}/nuxt.config.ts (100%) rename {docs => docs-old}/package.json (100%) rename {docs => docs-old}/pnpm-lock.yaml (100%) rename {docs => docs-old}/public/cover.jpg (100%) rename {docs => docs-old}/public/favicon.ico (100%) rename {docs => docs-old}/renovate.json (100%) rename {docs => docs-old}/tokens.config.ts (100%) rename {docs => docs-old}/tsconfig.json (100%) rename {docs => docs-old}/utils/index.ts (100%) create mode 100644 docs/.env.example create mode 100644 docs/.nuxtrc create mode 100644 docs/app.vue create mode 100644 docs/components/Footer.vue create mode 100644 docs/components/Header.vue create mode 100644 docs/components/OgImage/OgImageDocs.vue create mode 100644 docs/content/4.usage/_dir.yml create mode 100644 docs/content/4.usage/composables/_dir.yml create mode 100644 docs/content/4.usage/composables/useSupabaseClient.md create mode 100644 docs/content/4.usage/composables/useSupabaseUser.md create mode 100644 docs/content/4.usage/services/1.serverSupabaseClient.md create mode 100644 docs/content/4.usage/services/2.serverSupabaseServiceRole.md create mode 100644 docs/content/4.usage/services/3.serverSupabaseUser.md create mode 100644 docs/content/4.usage/services/_dir.yml create mode 100644 docs/content/5.demo.md create mode 100644 docs/content/6.changelog.md create mode 100644 docs/content/7.roadmap.md create mode 100644 docs/content/index.yml create mode 100644 docs/error.vue create mode 100644 docs/layouts/docs.vue diff --git a/.github/workflows/studio.yml b/.github/workflows/studio.yml deleted file mode 100644 index beaf78f3e..000000000 --- a/.github/workflows/studio.yml +++ /dev/null @@ -1,82 +0,0 @@ - -name: studio-nuxt-build -run-name: studio nuxt build - -on: - # Runs on pushes targeting the default branch - push: - branches: - - 'main' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Add write workflow permissions -permissions: - contents: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - # Build job - build-and-deploy: - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: docs - - strategy: - matrix: - os: [ubuntu-latest] - node: [18] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Identify package manager - id: pkgman - run: | - cache=`[ -f "docs/pnpm-lock.yaml" ] && echo "pnpm" || ([ -f "docs/package-lock.json" ] && echo "npm" || ([ -f "docs/yarn.lock" ] && echo "yarn" || echo ""))` - package_manager=`[ ! -z "$cache" ] && echo "$cache" || echo "pnpm"` - echo "cache=$cache" >> $GITHUB_OUTPUT - echo "package_manager=$package_manager" >> $GITHUB_OUTPUT - - - uses: pnpm/action-setup@v2.2.4 - if: ${{ steps.pkgman.outputs.package_manager == 'pnpm' }} - name: Install pnpm - id: pnpm-install - with: - version: 8 - - - uses: actions/setup-node@v3 - with: - version: ${{ matrix.node }} - cache: ${{ steps.pkgman.outputs.cache }} - - - name: Install dependencies - run: ${{ steps.pkgman.outputs.package_manager }} install - - - name: Install @nuxthq/studio - run: ${{ steps.pkgman.outputs.package_manager }} add -D @nuxthq/studio - - - name: Create .nuxtrc - run: echo 'modules[]=@nuxthq/studio' > .nuxtrc - - - name: Generate - run: ${{ steps.pkgman.outputs.package_manager }} nuxi generate - env: - NUXT_PUBLIC_STUDIO_API_URL: https://api.nuxt.studio - NUXT_PUBLIC_STUDIO_TOKENS: 074defe60624d32633e4fd97fdd223dcbfea4b064a290d7989aaa8d3496dc13b - - - name: Add .nojekyll file - run: touch .output/public/.nojekyll - - # Deployment job - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: docs/.output/public diff --git a/docs-old/.eslintignore b/docs-old/.eslintignore new file mode 100644 index 000000000..a1bd0c80d --- /dev/null +++ b/docs-old/.eslintignore @@ -0,0 +1,4 @@ +dist +node_modules +.output +.nuxt \ No newline at end of file diff --git a/docs-old/.eslintrc.cjs b/docs-old/.eslintrc.cjs new file mode 100644 index 000000000..38db31380 --- /dev/null +++ b/docs-old/.eslintrc.cjs @@ -0,0 +1,8 @@ +module.exports = { + root: true, + extends: '@nuxt/eslint-config', + rules: { + 'vue/max-attributes-per-line': 'off', + 'vue/multi-word-component-names': 'off' + } +} \ No newline at end of file diff --git a/docs-old/.gitignore b/docs-old/.gitignore new file mode 100644 index 000000000..69f6b69d0 --- /dev/null +++ b/docs-old/.gitignore @@ -0,0 +1,12 @@ +node_modules +*.iml +.idea +*.log* +.nuxt +.vscode +.DS_Store +coverage +dist +sw.* +.env +.output diff --git a/docs-old/.npmrc b/docs-old/.npmrc new file mode 100644 index 000000000..cf0404245 --- /dev/null +++ b/docs-old/.npmrc @@ -0,0 +1,2 @@ +shamefully-hoist=true +strict-peer-dependencies=false diff --git a/docs-old/README.md b/docs-old/README.md new file mode 100644 index 000000000..8607e02a8 --- /dev/null +++ b/docs-old/README.md @@ -0,0 +1,57 @@ +# Docus Starter + +Starter template for [Docus](https://docus.dev). + +## Clone + +Clone the repository (using `nuxi`): + +```bash +npx nuxi init -t themes/docus +``` + +## Setup + +Install dependencies: + +```bash +yarn install +``` + +## Development + +```bash +yarn dev +``` + +## Edge Side Rendering + +Can be deployed to Vercel Functions, Netlify Functions, AWS, and most Node-compatible environments. + +Look at all the available presets [here](https://v3.nuxtjs.org/guide/deploy/presets). + +```bash +yarn build +``` + +## Static Generation + +Use the `generate` command to build your application. + +The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting. + +```bash +yarn generate +``` + +## Preview build + +You might want to preview the result of your build locally, to do so, run the following command: + +```bash +yarn preview +``` + +--- + +For a detailed explanation of how things work, check out [Docus](https://docus.dev). diff --git a/docs-old/app.config.ts b/docs-old/app.config.ts new file mode 100644 index 000000000..ee13b70b0 --- /dev/null +++ b/docs-old/app.config.ts @@ -0,0 +1,57 @@ +export default defineAppConfig({ + docus: { + title: 'Nuxt Supabase', + description: 'A supa simple wrapper around supabase-js to enable usage and integration within Nuxt.', + image: '/cover.jpg', + + socials: { + twitter: 'nuxt_js', + github: 'nuxt-modules/supabase', + nuxt: { + label: 'Nuxt', + icon: 'simple-icons:nuxtdotjs', + href: 'https://nuxt.com' + }, + supabase: { + label: 'Supabase', + icon: 'simple-icons:supabase', + href: 'https://supabase.com' + } + }, + + github: { + dir: 'docs/content', + branch: 'main', + repo: 'supabase', + owner: 'nuxt-modules', + edit: true + }, + + aside: { + level: 0, + collapsed: false, + exclude: [] + }, + + main: { + padded: true, + }, + + header: { + logo: true, + showLinkIcon: true, + exclude: [], + title: 'Nuxt Supabase' + }, + + footer: { + credits: { + text: 'Made with Nuxt Studio', + icon: 'simple-icons:nuxtdotjs', + href: 'https://nuxt.studio' + } + }, + + titleTemplate: '%s · Nuxt Supabase' + } +}) diff --git a/docs/components/Logo.vue b/docs-old/components/Logo.vue similarity index 100% rename from docs/components/Logo.vue rename to docs-old/components/Logo.vue diff --git a/docs-old/components/content/Releases.vue b/docs-old/components/content/Releases.vue new file mode 100644 index 000000000..87cf97301 --- /dev/null +++ b/docs-old/components/content/Releases.vue @@ -0,0 +1,19 @@ + + + diff --git a/docs-old/components/content/VoltaBoard.vue b/docs-old/components/content/VoltaBoard.vue new file mode 100644 index 000000000..44f6a2cae --- /dev/null +++ b/docs-old/components/content/VoltaBoard.vue @@ -0,0 +1,14 @@ +