package
> GitHub integration for [Nuxt](https://v3.nuxtjs.org) & [Content](https://content.nuxtjs.org)
npm install @nuxtlabs/github-moduleGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
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>'<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>
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
}
}yarn install or npm installyarn prepare or npm run prepareplayground/.env, add your personal access tokenGITHUB_TOKEN='<your-personal-token>'yarn dev or npm run devatinux
atinux@gmail.com
Estimated unpacked size across 64 packages.
5.6 MB+
Includes dependencies.
8 direct · 6 outdated
^1.6.2
2.0.8
^1.1.1
1.6.4
^6.1.2
6.1.7
^3.3.2
4.6.4
^3.0.1
4.0.1
9.0.5