Giter Site home page Giter Site logo

namnguyenthanhwork / nextra-personal-website-template Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 215 KB

Build personal website (blog and docs theme) with Nextra

Home Page: https://nextra-personal-website-template.vercel.app

License: MIT License

JavaScript 16.46% MDX 64.80% SCSS 2.58% TypeScript 16.16%
blog-theme docs-theme nextjs nextra personal-blog

nextra-personal-website-template's Introduction

Nextra Personal Website Template

This template includes almost everything you need to build a personal website. You can write documents and blogs, have navigation bar, search bar, page bar, TOC bar, and other integrated components. And especially with multi-language support (i18n) - pre-configured Vietnamese and English.

View Demo โ†’

Technology used

  • NextJS 14
  • Nextra v3 alpha
  • Tailwind CSS, Shadcn/ui, Headless UI...
  • MDX v3

See more new features of Nextra v3 here

Start

Deploy on Vercel

You can get started by creating your own Nextra website and deploy to Vercel by clicking the link:

Vercel will copy the Nextra Personal Website Template and deploy the website for you. Once completed, every commit in the repo will be deployed automatically.

Copy Repository

You can also clone this repository manually.

Installation

To manually create a Nextra Docs site, you must install NextJS, React, Nextra V3 alpha and Nextra Docs Theme V3 alpha. In your project directory, run the following command to install the dependencies:

npm i next react react-dom nextra@alpha nextra-theme-docs@alpha

If you have NextJS installed in your project, you just need to install nextra nextra-theme-docs.

Add the following scripts package.json:

"scripts": {
  "dev": "next",
  "build": "next build",
  "start": "next start"
},

You can run the project using npm npm run dev, running in development mode or npm run build && npm run start production mode.

Add NextJS configuration

Create the next.config.js following file in the project root directory:

const withNextra = require('nextra')({
  theme: 'nextra-theme-docs',
  themeConfig: './theme.config.jsx',
});

module.exports = withNextra();

// If you have other Next.js configurations, you can pass them as parameters:
// module.exports = withNextra({ /* another next.js configuration */ })

With the above configuration, Nextra can process Markdown files in your NextJS project, with the theme specified. Other Nextra configurations can be found in the Guide.

Create Docs Theme configuration

Finally, create the theme.config.jsx corresponding file in the project root directory. This will be used to configure the Nextra Docs theme:

export default {
  logo: <span>Nextra Template</span>,
  project: {
    link: 'https://github.com/namnguyenthanhwork/nextra-personal-website-template',
  },
};

Full theme configuration can be found here.

Ready to use

You can now create your first MDX page at pages/index.mdx:

# Welcome to Nextra

Hello world!

And run the command next or next dev specified in package.json to start project development! ๐ŸŽ‰

nextra-personal-website-template's People

Contributors

namnguyenthanhwork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.