Skip to content

Commit

Permalink
feat: make it a theme (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Oct 7, 2022
1 parent 7abc54a commit db153ae
Show file tree
Hide file tree
Showing 31 changed files with 1,299 additions and 610 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ node_modules
.cache
.output
.env
dist
dist
.DS_Store

# Yarn
.yarn/cache
.yarn/*state*

# Local History
.history
64 changes: 9 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
[![Content Wind](https://github.com/Atinux/content-wind/raw/main/public/cover.jpg)](https://content-wind.nuxt.dev)
[![Content Wind](https://github.com/Atinux/content-wind/raw/main/public/cover.jpg)](https://content-wind.nuxt.space)

# Content Wind

A lightweight Nuxt template to write a Markdown driven website, based on [Nuxt Content](https://content.nuxtjs.org), [TailwindCSS](https://tailwindcss.com) and [Iconify](https://iconify.design).

- [Demo & Docs](https://content-wind.nuxt.dev)
- [Demo & Docs](https://content-wind.nuxt.space)
- [Play online](https://stackblitz.com/github/Atinux/content-wind?file=content%2F1.index.md)

## Features

- [Document-Driven Mode](https://content.nuxtjs.org/guide/writing/document-driven)
- Create pages in Markdown in the `content/` directory
- Use Nuxt layouts in your Markdown pages
- Enjoy meta tag generation from Markdown files
- Generated navigation based on your pages
- Create pages in Markdown in the `content/` directory
- Use Nuxt layouts in your Markdown pages
- Enjoy meta tag generation from Markdown files
- Generated navigation based on your pages
- Switch between Light & Dark mode :moon:
- Access 100,000 icons from 100+ icon sets with the [`<Icon>` component](https://github.com/Atinux/nuxt-icon)
- Highlight code blocks with [Shiki](https://shiki.matsu.io)
Expand All @@ -22,55 +21,10 @@ A lightweight Nuxt template to write a Markdown driven website, based on [Nuxt C

## Usage

Take a look at [content-wind.nuxt.dev](https://content-wind.nuxt.dev) for the complete documentation.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Deployment

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FAtinux%2Fcontent-wind) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/Atinux/content-wind)


### Static Hosting

Pre-render the website to be deployed on any static hosting:

```bash
npm run generate
```

The `dist/` directory is ready to be deployed (symlink to `.output/public`), [learn more on Nuxt docs](https://v3.nuxtjs.org/guide/deploy/static-hosting).

### Node server

Build the application for production:

```bash
npm run build
```

Start the server in production:
Start your project with:

```bash
node .output/server/index.mjs
npx nuxi@latest init -t themes/content-wind my-website
```

Learn more on [Nuxt docs](https://v3.nuxtjs.org/guide/deploy/node-server) for more information.
Then follow the instructions and you are ready to go :rocket:
29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "content-wind",
"private": false,
"version": "0.0.5",
"main": "nuxt.config.ts",
"private": true,
"workspaces": [
"./theme",
"./template"
],
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview",
"lint": "eslint ."
},
"dependencies": {
"@nuxt/content": "^2.1.1",
"@nuxtjs/color-mode": "^3.1.7",
"@nuxtjs/tailwindcss": "^5.3.3",
"@tailwindcss/typography": "^0.5.7",
"nuxt-icon": "^0.1.6"
"dev": "nuxi dev template",
"build": "nuxi build template",
"generate": "nuxi generate template",
"preview": "nuxi preview template",
"lint": "eslint .",
"release": "cd theme && standard-version && git push --follow-tags && npx npm publish",
"postinstall": "nuxi prepare theme"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "^11.0.0",
"eslint": "^8.24.0",
"nuxt": "^3.0.0-rc.11",
"standard-version": "^9.5.0",
"typescript": "^4.8.4"
}
}
27 changes: 27 additions & 0 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# My Website

Beautiful website propulsed by [content-wind](https://github.com/Atinux/content-wind) theme.

## Setup

Make sure to install the dependencies:

```bash
# yarn
yarn install

# npm
npm install
```

## Development Server

Start the development server on http://localhost:3000

```bash
npm run dev
```

## Deployment

Head over the [Nuxt 3 Deployment](https://v3.nuxtjs.org/getting-started/deployment) documentation.
11 changes: 4 additions & 7 deletions content/1.index.md → template/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ A lightweight Nuxt theme to build a Markdown driven website, based on [Nuxt Cont
## Features

::list
- [Document-Driven Mode](https://content.nuxtjs.org/guide/writing/document-driven)
::list{icon="ph:check-circle-light"}
- Create pages in Markdown in the `content/` directory
- Use Nuxt layouts in your Markdown pages
- Enjoy meta tag generation from Markdown files
- Generated navigation based on your pages
::
- Create pages in Markdown in the `content/` directory
- Use Nuxt layouts in your Markdown pages
- Enjoy meta tag generation from Markdown files
- Generated navigation based on your pages
- Switch between Light & Dark mode :moon:
- Access 100,000 icons from 100+ icon sets with the `<Icon>` component
- Highlight code blocks with [Shiki](https://shiki.matsu.io)
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions template/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default defineNuxtConfig({
extends: 'content-wind'
})
13 changes: 13 additions & 0 deletions template/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"private": true,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview"
},
"devDependencies": {
"content-wind": "latest",
"nuxt": "^3.0.0-rc.11"
}
}
File renamed without changes
File renamed without changes.
4 changes: 4 additions & 0 deletions template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
8 changes: 0 additions & 8 deletions theme.config.ts

This file was deleted.

15 changes: 15 additions & 0 deletions theme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.0.6](https://github.com/Atinux/content-wind/compare/v0.0.5...v0.0.6) (2022-10-07)


### Features

* theme structure ([8b38482](https://github.com/Atinux/content-wind/commit/8b38482a1ef36c5daf35a4d6151a61398b9ca6db))


### Bug Fixes

* correct title for GitHub icon ([4296312](https://github.com/Atinux/content-wind/commit/4296312b4b59dade7c9fdfbe23e083733a138886))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions theme/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "content-wind",
"private": false,
"version": "0.0.6",
"main": "nuxt.config.ts",
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview",
"lint": "eslint ."
},
"dependencies": {
"@nuxt/content": "^2.1.1",
"@nuxtjs/color-mode": "^3.1.7",
"@nuxtjs/tailwindcss": "^5.3.3",
"@tailwindcss/typography": "^0.5.7",
"nuxt-icon": "^0.1.6"
}
}
File renamed without changes.
4 changes: 4 additions & 0 deletions theme/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
7 changes: 5 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
"extends": "./template/.nuxt/tsconfig.json",
"include": [
"theme/**/*",
"template/**/*"
]
}
Loading

1 comment on commit db153ae

@vercel
Copy link

@vercel vercel bot commented on db153ae Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.