An opionionated Nuxt.js Template with Nuxt Content!
View Demo »
Explore the docs
·
Report Bug
·
Request Feature
Table of Contents
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:
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.
This template currently offers the following features. For more info, please read the guide.
- Markdown articles
- Markdown embeddable LaTeX (
rehype-mathjax
,remark-math
)- Math Equations
- Chemical Equations
- 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
)
- Powerful hooks (
- 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.
The list of tools that is used when development.
- npm
npm install npm@latest -g
- Pnpm
npm i -g pnpm
- Git
To run this template project in your local for personal use or contribution, simply perform the following.
- Clone the repo
git clone https://github.com/data-miner00/nuxt-content-template.git
- Install Node dependencies
pnpm i
- Start the development server
pnpm dev
- Copy the
.env.example
to.env
and replace the value forNUXT_PUBLIC_SITE_UR
. This is used for static-site generation.NUXT_PUBLIC_SITE_UR=https://www.mydomain.com
- 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.
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
List of resources that are helpful and would like to give credit to.
- Vue.js v3
- Nuxt v3
- Nuxt Content
- Robots.txt
- enji.dev
- How to Create a Custom Code Block With Nuxt Content v2
- VueUse
- @nuxtjs/color-mode
- Nuxt Tailwind
- How to add class attribute to the body tag in NuxtJs
- Nuxt i18n
- How to Build a Multi-Language Application with NuxtJS
- Vue i18n
- Nuxt Seo Kit
- Nuxt Image
- Nuxt UI