Skip to content

Commit 9ac56ec

Browse files
committed
Refactor package.json to rename the project to @riligar/knowledge, add files and engines fields, and include semantic-release dependencies. Update README.md to enhance installation instructions, add features section, and clarify the release process with automated versioning and changelog generation.
1 parent 0faa53b commit 9ac56ec

File tree

10 files changed

+60323
-41
lines changed

10 files changed

+60323
-41
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- prod
7+
- main
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
id-token: write
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v1
28+
with:
29+
bun-version: latest
30+
31+
- name: Install dependencies
32+
run: bun install --frozen-lockfile
33+
34+
- name: Build binary
35+
run: bun run build-bin
36+
37+
- name: Prepare npm package
38+
run: bun run prepare-npm
39+
40+
- name: Release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
run: bunx semantic-release

.npmignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Development files
2+
.git/
3+
.github/
4+
node_modules/
5+
.DS_Store
6+
*.log
7+
8+
# Documentation and examples
9+
docs/
10+
README.md
11+
CNAME
12+
install.sh
13+
14+
# Development configuration
15+
.gitignore
16+
bun.lock
17+
tsconfig.json
18+
knowledge.config.ts
19+
knowledge.config.example.json
20+
21+
# Build artifacts that shouldn't be published
22+
dist/
23+
24+
# Include the npm-specific README
25+
!README.npm.md
26+
27+
# Only include essential files for the npm package
28+
# The following will be included:
29+
# - package.json
30+
# - bin/
31+
# - src/
32+
# - index.ts
33+
# - LICENSE
34+
# - themes/
35+
# - README.npm.md

.releaserc.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"branches": [
3+
"main",
4+
"prod"
5+
],
6+
"plugins": [
7+
"@semantic-release/commit-analyzer",
8+
"@semantic-release/release-notes-generator",
9+
"@semantic-release/changelog",
10+
[
11+
"@semantic-release/npm",
12+
{
13+
"npmPublish": true,
14+
"tarballDir": "dist"
15+
}
16+
],
17+
[
18+
"@semantic-release/github",
19+
{
20+
"assets": [
21+
{
22+
"path": "dist/*.tgz",
23+
"label": "Package tarball"
24+
}
25+
]
26+
}
27+
],
28+
[
29+
"@semantic-release/git",
30+
{
31+
"assets": [
32+
"CHANGELOG.md",
33+
"package.json"
34+
],
35+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
36+
}
37+
]
38+
]
39+
}

CONTRIBUTING.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributing to Knowledge
2+
3+
Thank you for your interest in contributing to Knowledge! This document provides guidelines for contributing to the project.
4+
5+
## Commit Convention
6+
7+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate versioning and changelog generation. Please follow this format for your commit messages:
8+
9+
```
10+
<type>[optional scope]: <description>
11+
12+
[optional body]
13+
14+
[optional footer(s)]
15+
```
16+
17+
### Types
18+
19+
- **feat**: A new feature (triggers a minor version bump)
20+
- **fix**: A bug fix (triggers a patch version bump)
21+
- **docs**: Documentation only changes
22+
- **style**: Changes that do not affect the meaning of the code
23+
- **refactor**: A code change that neither fixes a bug nor adds a feature
24+
- **perf**: A code change that improves performance
25+
- **test**: Adding missing tests or correcting existing tests
26+
- **chore**: Changes to the build process or auxiliary tools
27+
28+
### Breaking Changes
29+
30+
For breaking changes, add `BREAKING CHANGE:` in the footer or add `!` after the type:
31+
32+
```
33+
feat!: remove deprecated API endpoint
34+
35+
BREAKING CHANGE: The /old-api endpoint has been removed. Use /new-api instead.
36+
```
37+
38+
### Examples
39+
40+
```bash
41+
feat: add search functionality to documentation
42+
fix: resolve markdown parsing issue with code blocks
43+
docs: update installation instructions
44+
chore: update dependencies
45+
```
46+
47+
## Development Workflow
48+
49+
1. Fork the repository
50+
2. Create a feature branch: `git checkout -b feat/your-feature`
51+
3. Make your changes following the commit convention
52+
4. Push to your fork: `git push origin feat/your-feature`
53+
5. Create a Pull Request
54+
55+
## Release Process
56+
57+
Releases are automated using semantic-release:
58+
59+
- **Patch releases** (1.0.1): Bug fixes
60+
- **Minor releases** (1.1.0): New features
61+
- **Major releases** (2.0.0): Breaking changes
62+
63+
The release process is triggered automatically when commits are pushed to the `prod` branch.
64+
65+
## Local Development
66+
67+
```bash
68+
# Install dependencies
69+
bun install
70+
71+
# Start development server
72+
bun run dev
73+
74+
# Build the project
75+
bun run build
76+
77+
# Test the CLI
78+
bun run knowledge --help
79+
```
80+
81+
## Questions?
82+
83+
Feel free to open an issue if you have any questions about contributing!

README.md

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,61 +8,89 @@
88

99
**Knowledge** is a modern static documentation generator that transforms Markdown files into professional documentation sites. It's the perfect tool for anyone who wants to create beautiful and functional documentation without complications.
1010

11-
## 📦 Quick Installation
11+
## 🚀 Features
1212

13-
### Global Installation (Recommended)
13+
- **Markdown-First**: Write documentation in familiar Markdown syntax
14+
- **Static Site Generation**: Fast, secure, and SEO-friendly output
15+
- **Modern Themes**: Beautiful, responsive themes out of the box
16+
- **Search Integration**: Built-in search functionality
17+
- **CLI Tool**: Simple command-line interface for easy management
18+
- **Live Development**: Hot-reload during development
1419

15-
```bash
16-
# Using Bun (fastest)
17-
bun install -g knowledge
20+
## 📦 Installation
1821

19-
# Using npm
20-
npm install -g knowledge
22+
### NPM (Recommended)
2123

22-
# Using the install script
23-
curl -fsSL https://raw.githubusercontent.com/riligar/knowledge/main/install.sh | bash
24+
```bash
25+
npm install -g @riligar/knowledge
2426
```
2527

26-
### Quick Start
28+
### Direct Download
2729

2830
```bash
29-
# Create a new project
30-
mkdir my-docs && cd my-docs
31+
curl -fsSL https://raw.githubusercontent.com/riligar/knowledge/main/install.sh | sh
32+
```
3133

32-
# Initialize Knowledge project
33-
knowledge init
34+
## 🎯 Quick Start
3435

35-
# Install dependencies
36-
bun install # or npm install
36+
1. **Initialize a new project**:
37+
```bash
38+
knowledge init my-docs
39+
cd my-docs
40+
```
3741

38-
# Start development server
39-
knowledge dev
42+
2. **Start development server**:
43+
```bash
44+
knowledge dev
45+
```
4046

41-
# Build for production
42-
knowledge build
47+
3. **Build for production**:
48+
```bash
49+
knowledge build
50+
```
4351

44-
# Serve built site
45-
knowledge serve
52+
## 📖 Documentation
53+
54+
Visit our [official documentation](https://myknowledge.click) for detailed guides and examples.
55+
56+
## 🤝 Contributing
57+
58+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
59+
60+
### Commit Convention
61+
62+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for automated versioning and changelog generation. Please format your commits as:
63+
64+
```
65+
feat: add new feature
66+
fix: resolve bug
67+
docs: update documentation
4668
```
4769

48-
## ⚡ Why use Knowledge?
70+
## 🔄 Release Process
71+
72+
Releases are fully automated using semantic-release:
73+
74+
- **Automatic versioning** based on commit messages
75+
- **Changelog generation** from conventional commits
76+
- **NPM publishing** on every release
77+
- **GitHub releases** with detailed notes
4978

50-
### **Extreme Simplicity**
51-
- Write in plain Markdown
52-
- Configure once, use always
53-
- Generate professional sites automatically
79+
Simply push to the `prod` branch and let the automation handle the rest!
5480

55-
### **Professional Features**
56-
- 🔍 **Instant search** across all content
57-
- 📱 **Responsive design** (mobile + desktop)
58-
- 🌙 **Automatic dark mode**
59-
- 🎨 **Syntax highlighting** for code
60-
- 🧭 **Automatic navigation** based on folders
81+
## 📄 License
82+
83+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
84+
85+
## 🌟 Support
86+
87+
- 📧 Email: maciel.ciro@icloud.com
88+
- 🐛 Issues: [GitHub Issues](https://github.com/riligar/knowledge/issues)
89+
- 💬 Discussions: [GitHub Discussions](https://github.com/riligar/knowledge/discussions)
90+
91+
---
6192

62-
### **Productivity**
63-
- 🚀 **Fast build** with Bun.js (seconds)
64-
- 📦 **Simple deploy** to any hosting
65-
- 🔧 **Zero configuration** required
93+
Made with ❤️ by [Riligar](https://riligar.click)
6694

6795
## 🚀 How to Use (3 Steps)
6896

0 commit comments

Comments
 (0)