Skip to content

Latest commit

ย 

History

History
121 lines (90 loc) ยท 3.52 KB

File metadata and controls

121 lines (90 loc) ยท 3.52 KB

CONTRIBUTING

Make sure that you follow CODE_OF_CONDUCT.md while contributing and engaging in the discussions.

Prerequisites

Before you start contributing, make sure you have the following tools installed:

  • Node.js (>= 20.0.0) - Required for package management and build tools
  • Hugo Extended (>= 0.156.0) - The static site generator
  • pnpm - Package manager (recommended)

You can check your installed versions:

node --version
hugo version
pnpm --version

How to contribute to this project

First, fork this repository by clicking the fork button.

Next, clone your forked repo.

git clone https://github.com/hugo-fixit/FixIt.git && cd FixIt

Then, install the dev dependencies.

pnpm install

And now you are ready to go!

Here are some useful commands for development:

Development

# Start demo site development server
pnpm dev:demo
# Start test site development server
pnpm dev:test
# Start documentation development server (requires fixit-docs as sibling directory)
pnpm dev:docs

Tip

  • Add -e production to the development command to check the production environment, e.g. pnpm dev:test -e production.
  • For documentation-related theme changes, it is recommended to clone both FixIt and fixit-docs as sibling directories.

Building

# Build demo site
pnpm build:demo
# Build test site
pnpm build:test
# Build all sites
pnpm build

Preview

# Preview the built site locally (requires build first)
pnpm preview

Project Structure

Understanding the project structure will help you contribute more effectively:

FixIt/
โ”œโ”€โ”€ apps/               # Minimal sites
โ”‚   โ”œโ”€โ”€ demo/           # Demo site
โ”‚   โ””โ”€โ”€ test/           # Test site
โ”œโ”€โ”€ archetypes/         # Content templates
โ”œโ”€โ”€ assets/             # Theme assets
โ”‚   โ”œโ”€โ”€ css/            # SCSS stylesheets
โ”‚   โ”œโ”€โ”€ js/             # JavaScript files
โ”‚   โ”œโ”€โ”€ images/         # Image assets
โ”‚   โ””โ”€โ”€ lib/            # Third-party libraries
โ”œโ”€โ”€ i18n/               # Internationalization files
โ”œโ”€โ”€ layouts/            # Hugo template files
โ”‚   โ”œโ”€โ”€ _markup/        # Hugo render hooks
โ”‚   โ”œโ”€โ”€ _partials/      # Reusable template components
โ”‚   โ””โ”€โ”€ _shortcodes/    # Custom shortcodes
โ”œโ”€โ”€ packages/           # Theme-related packages
โ”œโ”€โ”€ static/             # Static files
โ”œโ”€โ”€ hugo.toml           # Default theme configuration
โ””โ”€โ”€ package.json        # npm scripts and dependencies

Development Workflow

  1. Make your changes in the appropriate directories
  2. Test locally using pnpm dev or pnpm test
  3. Check different environments with production builds
  4. Verify documentation changes with pnpm dev:docs (if applicable)
  5. Commit your changes following the commit message format below

Pull Request Guidelines

  • Create a feature branch from main
  • Make your changes with clear, focused commits
  • Test your changes thoroughly
  • Update documentation if needed
  • Submit a pull request with a clear description

Finally, create a new pull request at https://github.com/hugo-fixit/FixIt/pulls to submit your contribution ๐ŸŽ‰

Git Commit Guidelines

We follow the Conventional Commits specification for commit messages. This enables automatic changelog generation using our custom template: conventional.hbs.