Skip to content
Hiep Nguyen edited this page Feb 5, 2024 · 1 revision

Project Documentation

Project Structure

This project follows a standard structure for a Next.js application with TypeScript. Here's a brief overview of the main directories and files:

  • app/: Contains the main application files, including the main layout and pages.
  • components/: Contains reusable React components.
  • layouts/: Contains layout components used across different pages.
  • public/: Contains static files like images, which can be accessed directly via URL.
  • scripts/: Contains scripts for various tasks like linting and testing.
  • css/: Contains CSS files, including custom styles and styles for Prism.js.
  • data/: Contains site metadata.

Getting Started

  1. Clone the repository:
    gh repo clone centopw/tanhiep.dev
    
  2. Install dependencies:
    yarn install
    
  3. Start the development server:
    yarn dev
    

Configuration

  • Site-related information can be updated in data/siteMetadata.js.
  • ESLint configuration can be found in .eslintrc.js.
  • PostCSS configuration can be found in postcss.config.js.
  • Tailwind CSS configuration can be found in tailwind.config.js.

Layouts

This project uses several layout components, including:

  • RootLayout: The root layout for the application.
  • Layout: The layout for blog pages.
  • PostLayout: The layout for individual posts.
  • ListLayout: The layout for lists of items.

Components

This project uses several reusable components, including:

  • LayoutWrapper: A wrapper for layout components.

Scripts

This project includes several scripts for development tasks, which can be run with yarn run <script>:

  • dev: Start the development server.
  • build: Build the application for production.
  • start: Start the production server.
  • lint: Lint the project with ESLint.
  • test: Run tests.

Deployment

This project can be deployed on Vercel or any other hosting service that supports Next.js.

License

This project is licensed under the MIT license. See the LICENSE file for details.

Clone this wiki locally