Skip to content

data-miner00/nuxt-content-template

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Nuxt Content Template

An opionionated Nuxt.js Template with Nuxt Content!
View Demo »

Explore the docs · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

Template screenshot

An extremely opinionated template for building Markdown oriented Nuxt websites with Nuxt Content and TailwindCSS. Focus on the development itself rather than low-level configurations.

Incentives:

  • Wanted to build out my new personal website
  • Want Markdown
  • Want newest version of Vue, Nuxt and Nuxt Content (at the time).
  • Build this multi-purpose template so I can use for other projects.

Projects that use this template:

(back to top)

Built With

The technologies and tools used within this template.

  • Vue
  • Nuxt
  • Nuxt Content
  • TailwindCSS
  • TypeScript

The version for Nuxt (3.6.1) and Nuxt Content (2.7.0) must remain. Updating the version for these two packages will break the static site generation. Regardless, the existing version in my humble opinion is good enough to create a functional documentation/blogs.

(back to top)

Features

This template currently offers the following features. For more info, please read the guide.

  • Markdown articles
  • Markdown embeddable LaTeX (rehype-mathjax, remark-math)
  • Internationalization (i18n, @nuxtjs/i18n)
  • Dark Mode (@nuxtjs/color-mode)
  • Mobile responsive
  • Styling with TailwindCSS
  • Static-site generation
  • Simple SEO (nuxt-seo-kit)
    • Auto-generated Sitemap.xml
    • robots.txt
    • Optimized site metadata
  • Image optimization (@nuxt/image)
  • Vue utilities
    • Powerful hooks (@vueuse/core)
    • Animation (@vueuse/motion)
  • 404 Page (the /resource url does not exist)
  • Ultra-fast loading speed
  • Support for Node 18 and Node 20
  • Typo checking (need to install from crates-ci/typos)
  • Sass support (although I don't remember using it 😁)

Again, if you wish to grok what this template is capable of, consider visiting my technical blog to see it for yourself.

(back to top)

Getting Started

Prerequisites

The list of tools that is used when development.

  • npm
    npm install npm@latest -g
  • Pnpm
    npm i -g pnpm
  • Git

Installation

To run this template project in your local for personal use or contribution, simply perform the following.

  1. Clone the repo
    git clone https://github.com/data-miner00/nuxt-content-template.git
  2. Install Node dependencies
    pnpm i
  3. Start the development server
    pnpm dev
  4. Copy the .env.example to .env and replace the value for NUXT_PUBLIC_SITE_UR. This is used for static-site generation.
    NUXT_PUBLIC_SITE_UR=https://www.mydomain.com
  5. Build/generate static website
    pnpm generate

⚠️ Important: Do not update the dependencies as it will break due to incompatibilities from the latest Nuxt and Nuxt Content.

(back to top)

Roadmap

  • Add Dark Mode
  • Add i18n
  • Add Styling
    • Sass
    • Tailwind
  • Add PWA Manifest
  • Responsive styles
  • DocSearch
  • Copy code block button
  • Add line numbers to code block
  • Add highlight to code block
  • Add missing items to mobile navbar

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

List of resources that are helpful and would like to give credit to.

(back to top)