Skip to content

docs: migrate docs to nuxt/content #404

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

Merged
merged 12 commits into from
Aug 12, 2020
Merged
10 changes: 9 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
.vuepress/dist
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
40 changes: 0 additions & 40 deletions docs/.vuepress/config.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
<template>
<div>
<a href="https://vueschool.io/lessons/the-axios-module?friend=nuxt" target="_blank" class="Promote">
<img src="/async-data-with-nuxtjs-2x.png" alt="AsyncData Nuxt course by Vue School">
<div class="Promote__Content">
<h4 class="Promote__Content__Title">Learn how to use the Axios module with a short video lesson</h4>
<p class="Promote__Content__Description">Get up to speed quickly with Vue School's free video lesson.</p>
<p class="Promote__Content__Signature">Video courses made by VueSchool to support Nuxt.js developpement.</p>
</div>
</a>
</div>
</template>

<script>
export default {
name: 'PromoteBlock'
}
</script>

<style>
.Promote {
background-color: #edf2f7;
color: #2f495e;
Expand All @@ -7,11 +27,11 @@
margin-top: 1rem;
margin-bottom: 1rem;
border-radius: .25rem;
text-decoration: none !important;
}


.Promote:hover {
background-color: #e2e8f0 !important;
background-color: #e2e8f0;
text-decoration: none !important;
}

Expand All @@ -20,6 +40,7 @@
height: auto;
border-radius: .25rem;
margin-bottom: .75rem;
margin-top: 0;
}

.Promote .Promote__Content {
Expand Down Expand Up @@ -60,7 +81,6 @@
padding-left: 1rem;
}


.Promote .Promote__Content__Title {
margin: 0;
}
Expand All @@ -71,4 +91,16 @@
}

}

.dark-mode .Promote {
background: #2d3041;
}
.dark-mode .Promote .Promote__Content__Description {
color: #fff;
}
.dark-mode .Promote .Promote__Content__Signature {
color: #ebebeb;
}
.dark-mode .Promote:hover {
background: #43485a;
}
</style>
8 changes: 7 additions & 1 deletion docs/extend.md → docs/content/en/extend.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Extending Axios
---
title: 'Extending Axios'
description: ''
position: 2
category: 'Extending Axios'
---


If you need to customize axios by registering interceptors and changing global config, you have to create a nuxt plugin.

Expand Down
8 changes: 7 additions & 1 deletion docs/helpers.md → docs/content/en/helpers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Helpers
---
title: 'Helpers'
description: ''
position: 3
category: 'Helpers'
---


## Interceptors

Expand Down
36 changes: 36 additions & 0 deletions docs/content/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: 'Introduction'
description: ''
position: 1
category: 'Getting started'
menuTitle: 'Intro'
features:
- Automatically set base URL for client & server side
- Exposes `setToken` function to `$axios` so we can easily and globally set authentication tokens
- Automatically enables `withCredentials` when requesting to base URL
- Proxy request headers in SSR (Useful for auth)
- Fetch Style requests
- Integrated with Nuxt.js Progressbar while making requests
- Integrated with Proxy Module
- Auto retry requests with axios-retry
---

## Features

<list :items="features"></list>

> Secure and Easy [Axios](https://github.com/axios/axios) integration with Nuxt.js.

## Links

* [GitHub](https://github.com/nuxt-community/axios-module)
* [Release Notes](/releases)
* [Migration Guide](migration)
* [Examples](https://axios.nuxtjs.org/usage.html)

> 👉 To get started head to [Setup](/setup) section.

## Online courses

<promote-block>
</promote-block>
8 changes: 7 additions & 1 deletion docs/migration.md → docs/content/en/migration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Migration guides
---
title: 'Migration guides'
description: ''
position: 6
category: 'Migration'
---


### From 4.x to 5.x

Expand Down
8 changes: 7 additions & 1 deletion docs/options.md → docs/content/en/options.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Options
---
title: 'Options'
description: ''
position: 4
category: 'Getting started'
---


You can pass different options using module inline options:

Expand Down
7 changes: 6 additions & 1 deletion docs/setup.md → docs/content/en/setup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
title: 'Setup'
description: ''
position: 2
category: 'Getting started'
---

# Setup

## Install

Expand Down
8 changes: 7 additions & 1 deletion docs/usage.md → docs/content/en/usage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Usage
---
title: 'Usage'
description: ''
position: 3
category: 'Getting started'
---


## Component

Expand Down
4 changes: 4 additions & 0 deletions docs/content/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Axios Module",
"github": "nuxt-community/axios-module"
}
18 changes: 18 additions & 0 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import theme from '@nuxt/content-theme-docs'

export default theme({
loading: { color: '#00CD81' },
i18n: {
locales: () => [{
code: 'en',
iso: 'en-US',
file: 'en-US.js',
name: 'English'
}],
defaultLocale: 'en'
},
content: {
liveEdit: false
},
components: true
})
13 changes: 9 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "docs",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vuepress dev",
"build": "vuepress build"
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"devDependencies": {
"vuepress": "^1.5.2"
"dependencies": {
"@nuxt/content-theme-docs": "^0.4.0",
"nuxt": "^2.14.1"
}
}
43 changes: 0 additions & 43 deletions docs/readme.md

This file was deleted.

File renamed without changes.
20 changes: 20 additions & 0 deletions docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
theme: {
extend: {
colors: {
primary: {
50: '#F2F9F7',
100: '#E6F3F0',
200: '#C0E2D8',
300: '#9AD0C1',
400: '#4EAD93',
500: '#028A64',
600: '#027C5A',
700: '#01533C',
800: '#013E2D',
900: '#01291E'
}
}
}
}
}
Loading