1.6.3 • Published 3 years ago
@nuxtlabs/github-module v1.6.3
Github Module
Setup
Install @nuxtlabs/github-module in your project:
# Using Yarn
yarn add --dev @nuxtlabs/github-module
# Using NPM
npm install --save-dev @nuxtlabs/github-module
# Using PNPM
pnpm add --save-dev @nuxtlabs/github-moduleThen, add @nuxtlabs/github-module to the modules section of your nuxt.config.ts:
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
modules: [
'@nuxt/content', // Required
'@nuxtlabs/github-module'
],
github: {
repo: 'nuxt/framework' // Or use GITHUB_REPO in .env
}
})Lastly, create a personal access token on GitHub and add it into your .env:
GITHUB_TOKEN='<your-personal-token>'Usage
<script setup lang="ts">
const { data: releases } = await useAsyncData('releases', () => githubReleases())
</script>
<template>
<div>
<div v-for="release in releases" :key="release.name">
<ProseH2 :id="release.name">{{ release.name }}</ProseH2>
<Content :document="release" />
</div>
</div>
</template>Options
github: {
repo: string,
releases: false | {
api: string
repo: string
token: string
/**
* Parse release notes markdown and return AST tree
*
* Note: This option is only available when you have `@nuxt/content` installed in your project.
*
* @default true
*/
parse: boolean
}
}Development
- Clone this repository
- Install dependencies using
yarn installornpm install - Generate type stubs using
yarn prepareornpm run prepare - In
playground/.env, add your personal access tokenGITHUB_TOKEN='<your-personal-token>' - Launch playground using
yarn devornpm run dev
1.6.3
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.4
3 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.11
3 years ago
1.4.13
3 years ago
1.4.12
3 years ago
1.4.9
3 years ago
1.4.8
3 years ago
1.4.10
3 years ago
1.4.7
3 years ago
1.4.6
3 years ago
1.4.5
3 years ago
1.4.4
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.2
3 years ago