Cover image
Try Now
2025-04-13

图形可视化应用程序,专注于布局,而IDE像IDE一样

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Nuxt3 x GitHub Pages

Welcome on this repo!

This is a basic template of an application using Nuxt3 published within the Github pages.

This is possible through the use of the gh-pages library.

Getting Started

What is Nuxt3?

Nuxt3 is a easy-to-use Web Framework based on Vue3 with Server Side Rendering.

You can found more infos and docs on Nuxt3 on https://nuxt.com/.

What is gh-pages?

gh-pages is a library which allows you to publish files to a gh-pages branch on GitHub (or any other branch anywhere else).

You can found more infos and docs on gh-pages on https://github.com/tschaub/gh-pages.

Basic Usage

Configuration

We need to configure correctly the baseUrl path inside the nuxt.config.ts file.

If this is the main GitHub Pages repo, in example dariotecchia.github.io, we need an empty base url:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  app: {
    baseURL: ''
  },
})

Or you can delete this property.

If you want to deploy a repo hosted on a different repo you need to configure the baseURL with the name of the repo:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  app: {
    baseURL: '/nuxt3-ghpages/'
  },
})

As you can see, in this case the value is /nuxt3-ghpages/, the name of this repo.

First Deploy

The use is really simple.

First, an initial "deployment" must be done via gh-pages to allow the branch to be created from where the GitHub Pages will be deployed.

To do this we need to install the node modules via the npm install command, make sure everything is ok by doing a first local deployment via npm run dev.

If everything was ok then we can proceed with the first deploy and the automatic creation of the deployment branch.

Run the command npm run deploy, which will just run the command nuxt generate && gh-pages --dotfiles -d .output/public, so first the deployment package is generated via nuxt generate and then the contents of .output/public is pushed to the gh-pages branch.

After this is successfully executed we can move to the repository settings to go and set up the GitHub Pages.

Setting up GitHub Pages

Go in the Settings tab: GitHub Bar

Go in the Pages menu: GitHub Bar

Choose the branch where gh-pages push the dist directory: GitHub Bar

Now wait for deploy. If everything will be ok you can found this: GitHub Bar

You can find the deploy at this url: https://dariotecchia.github.io/nuxt3-ghpages/

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    4 (1)
    Avatar
    user_ehb6pUlU
    2025-04-16

    KBG by ocasazza is an outstanding tool that has significantly improved my workflow. Its intuitive interface and seamless integration with MCP applications make it an essential addition for any developer. The detailed documentation and welcoming community on GitHub are incredibly helpful. I highly recommend checking out KBG if you're looking for a powerful and reliable solution!