{"id":30303767,"url":"https://github.com/aaronlamz/navpress","last_synced_at":"2026-04-21T09:01:46.979Z","repository":{"id":250013407,"uuid":"833154674","full_name":"aaronlamz/navpress","owner":"aaronlamz","description":"Easy navigation generator ","archived":false,"fork":false,"pushed_at":"2026-04-07T09:35:03.000Z","size":649,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-07T11:19:28.352Z","etag":null,"topics":["nav","nav-generator","navigation-generator","vuejs"],"latest_commit_sha":null,"homepage":"https://www.justexploring.fun/navpress/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronlamz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-24T13:09:39.000Z","updated_at":"2026-04-07T09:35:05.000Z","dependencies_parsed_at":"2024-08-05T13:29:08.747Z","dependency_job_id":"db1270c3-0e91-4efa-bddc-2c71b627d288","html_url":"https://github.com/aaronlamz/navpress","commit_stats":null,"previous_names":["aaronlamz/nav-generator","aaronlamz/navpress"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/aaronlamz/navpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlamz%2Fnavpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlamz%2Fnavpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlamz%2Fnavpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlamz%2Fnavpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronlamz","download_url":"https://codeload.github.com/aaronlamz/navpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlamz%2Fnavpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32084721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nav","nav-generator","navigation-generator","vuejs"],"created_at":"2025-08-17T06:06:00.170Z","updated_at":"2026-04-21T09:01:46.973Z","avatar_url":"https://github.com/aaronlamz.png","language":"JavaScript","funding_links":[],"categories":["Components \u0026 Libraries"],"sub_categories":["UI Components"],"readme":"# NavPress\n\n[![npm version](https://img.shields.io/npm/v/navpress.svg)](https://www.npmjs.com/package/navpress)\n[![npm downloads](https://img.shields.io/npm/dm/navpress.svg)](https://www.npmjs.com/package/navpress)\n[![GitHub stars](https://img.shields.io/github/stars/aaronlamz/navpress.svg)](https://github.com/aaronlamz/navpress)\n[![License](https://img.shields.io/npm/l/navpress.svg)](https://github.com/aaronlamz/navpress/blob/main/LICENSE)\n\n\u003e [简体中文](./README_zh.md) | English\n\n**NavPress** is a powerful CLI tool for generating beautiful static navigation websites. Build your personal navigation site in minutes with a simple configuration file. Perfect for developers, teams, and anyone who wants to organize their favorite links.\n\n## ✨ Features\n\n- 🎯 **Simple Configuration**: Define your navigation and sidebar through a single configuration file\n- ⚡ **Hot Reload**: Configuration changes apply instantly during development\n- 🏗️ **Production Ready**: Built-in SSR support, automatically generates static HTML files\n- 🎨 **Modern Stack**: Built with Vue.js 3 and Tailwind CSS\n- 📱 **Responsive Design**: Perfect for desktop and mobile devices\n- 🔗 **Flexible Routing**: Support multiple URL formats (query, path, hash)\n- 🖼️ **Built-in Icons**: Default icons included, custom icons supported\n- 🚀 **CLI Tool**: Easy-to-use command line interface\n- 📦 **Zero Dependencies**: Lightweight and fast\n- 🔄 **Automated CI/CD**: GitHub Actions for automatic npm publishing and GitHub Pages deployment\n\n## Preview\n\n[View Demo](https://aaronlamz.github.io/navpress/)\n\n## 🚀 Installation\n\n### Quick Install\n\n```bash\nnpm install -g navpress@latest\n```\n\n### Alternative Installation Methods\n\n```bash\n# Using yarn\nyarn global add navpress@latest\n\n# Using pnpm\npnpm add -g navpress@latest\n\n# Local development\nnpm install navpress@latest --save-dev\n```\n\n### Verify Installation\n\n```bash\nnavpress --version\n# Output: navpress@1.1.5\n```\n\n## 🚀 Quick Start\n\n### 1. Create Configuration File\n\nCreate `navpress.config.js` in your project root:\n\n```javascript\nexport default {\n  title: 'My Navigation',\n  description: 'Personal website navigation',\n  logo: '/images/logo.svg',\n  base: '/',\n\n  sidebar: [\n    {\n      text: 'Development Tools',\n      link: '/tools',\n      items: [\n        {\n          text: 'Frontend Frameworks',\n          link: '#frameworks',\n          items: [\n            {\n              text: 'Vue.js',\n              link: 'https://vuejs.org',\n              description: 'Progressive JavaScript Framework',\n            },\n            {\n              text: 'React',\n              link: 'https://reactjs.org',\n              description: 'JavaScript library for building user interfaces',\n            },\n          ],\n        },\n      ],\n    },\n  ],\n}\n```\n\n### 2. Start Development Server\n\n```bash\n# If installed globally\nnavpress dev\n\n# If installed locally\nnpx navpress dev\n```\n\n### 3. Build for Production\n\n```bash\n# Build static files\nnavpress build\n\n# Built files will be in dist directory\n```\n\n## ⚙️ Configuration\n\n### Basic Configuration\n\n| Field           | Type   | Description                                    | Default              |\n| --------------- | ------ | ---------------------------------------------- | -------------------- |\n| `title`         | string | Website title                                  | `NavPress`           |\n| `description`   | string | Website description                            | `Navigation Website` |\n| `logo`          | string | Logo image path                                | `/images/logo.svg`   |\n| `base`          | string | Base deployment path                           | `/`                  |\n| `urlFormat`     | string | URL format: 'query', 'path', 'hash'            | `query`              |\n| `sidebarExpand` | string | Default expand strategy: 'all', 'first', 'none'| `all`                |\n\n### Sidebar Configuration\n\n```javascript\nsidebar: [\n  {\n    text: 'Category Name',\n    link: '/category', // Category page path\n    icon: '/icon.svg', // Optional: custom icon\n    items: [\n      {\n        text: 'Sub Group',\n        link: '#section', // Anchor link\n        items: [\n          {\n            text: 'Website Name',\n            link: 'https://example.com',\n            icon: '/site-icon.svg', // Optional\n            description: 'Website description', // Optional\n          },\n        ],\n      },\n    ],\n  },\n]\n```\n\n### Sidebar Expand Strategy\n\nUse `sidebarExpand` to control the default open/closed state of top-level sidebar menus:\n\n- **all** (default): all menus expanded\n- **first**: only the first menu expanded, others collapsed\n- **none**: all menus collapsed\n\nPer-item `expanded: true | false` overrides the global strategy.\n\n```javascript\nexport default {\n  sidebarExpand: 'first',\n  sidebar: [\n    { text: 'Home', link: '/', items: [] },                              // expanded (first)\n    { text: 'Projects', link: '/project', items: [] },                   // collapsed\n    { text: 'Tools', link: '/tools', expanded: true, items: [] },        // override: expanded\n  ],\n}\n```\n\n### URL Format Options\n\n- **query** (Recommended): `/tools?section=frameworks` - Uses query parameters\n- **path**: `/tools/frameworks` - Uses path parameters\n- **hash**: `/tools#frameworks` - Uses hash parameters\n\n## 🚀 Deployment\n\n### Quick Deploy\n\n```bash\n# Build your site\nnavpress build\n\n# Deploy to any static hosting service\n# The built files are in the `dist` directory\n```\n\n### Popular Hosting Options\n\n#### GitHub Pages\n\n1. Fork this repository\n2. Enable GitHub Pages in repository settings\n3. Select `gh-pages` branch as source\n4. Modify `navpress.config.js` with your configuration\n\n#### Netlify\n\n```bash\n# Build and deploy\nnavpress build\n# Drag and drop the `dist` folder to Netlify\n```\n\n#### Vercel\n\n```bash\n# Install Vercel CLI\nnpm i -g vercel\n\n# Deploy\nnavpress build\nvercel --prod\n```\n\n#### Any Static Hosting\n\n```bash\nnavpress build\n# Upload the `dist` directory to your hosting service\n```\n\n## 🛠️ Development\n\n### Commands\n\n```bash\nnpm run dev      # Vite dev server (source code HMR, fast iteration)\nnpm run build    # Build src/ → dist/ (pre-built assets)\nnpm run preview  # Build + serve with CLI (same as end-user experience)\nnpm run lint     # Run linting\nnpm run format   # Format code\n```\n\n### Development Workflow\n\n```\nnpm run dev      →  Edit source code with Vite HMR\nnpm run preview  →  Verify the CLI serves pre-built dist/ correctly\nnpm link         →  Test in a real consumer project (optional)\n```\n\n`npm run preview` is the key command — it builds `dist/` and then starts the CLI dev server, giving you the exact same experience as a user who installed navpress from npm.\n\n### Project Structure\n\n```\nnavpress/\n├── bin/\n│   └── navpress.mjs          # CLI entry point\n├── src/\n│   ├── main.js               # App entry (config loading + HMR)\n│   ├── App.vue               # Root component (layout)\n│   ├── components/            # Vue components\n│   ├── pages/                 # Page components\n│   ├── utils/                 # Utility functions\n│   ├── assets/                # Static assets \u0026 styles\n│   ├── router/                # Vue Router config\n│   └── node/                  # SSR prerender\n├── vite.config.js             # Vite config (with hot reload plugin)\n├── tailwind.config.cjs        # Tailwind CSS config\n├── navpress.config.js         # Demo configuration\n├── index.html                 # HTML template\n└── package.json\n```\n\nFor detailed development guide, see [Contributing Guide](./CONTRIBUTING.md).\n\n## ❓ FAQ\n\n### How to add custom icons?\n\nSet the `icon` field in configuration:\n\n```javascript\n{\n  text: 'Website Name',\n  link: 'https://example.com',\n  icon: '/path/to/icon.svg'  // or https://example.com/icon.png\n}\n```\n\n### How to change deployment path?\n\nSet the `base` field:\n\n```javascript\nexport default {\n  base: '/my-nav/', // Deploy to yoursite.com/my-nav/\n  // ...other config\n}\n```\n\n### How to support multiple languages?\n\nCreate multiple configuration files and use different build commands:\n\n```bash\n# English version\nnavpress build --config navpress.en.js\n\n# Chinese version\nnavpress build --config navpress.zh.js\n```\n\n### How to update NavPress?\n\n```bash\n# Update to latest version\nnpm update -g navpress@latest\n\n# Or reinstall\nnpm install -g navpress@latest\n```\n\n### How to uninstall NavPress?\n\n```bash\nnpm uninstall -g navpress\n```\n\n### How to check NavPress version?\n\n```bash\nnavpress --version\n# or\nnpm list -g navpress\n```\n\n## 🚀 CI/CD Pipeline\n\nNavPress uses GitHub Actions for automated deployment and publishing:\n\n### Trigger Conditions\n\n- **📦 npm Publishing**: Include `publish` in your commit message\n  ```bash\n  git commit -m \"feat: add new feature [publish]\"\n  ```\n- **🌐 GitHub Pages**: Include `deploy` in your commit message\n  ```bash\n  git commit -m \"docs: update documentation [deploy]\"\n  ```\n- **🔄 Regular Commits**: No special identifier needed (won't trigger deployment)\n\n### Workflow Steps\n\n1. **npm Publishing** (`publish` identifier):\n\n   - Bumps version automatically\n   - Publishes to npm registry\n   - Creates GitHub release\n   - Tags the release\n\n2. **GitHub Pages** (`deploy` identifier):\n   - Builds the project\n   - Deploys to GitHub Pages\n   - Updates live demo site\n\n## 🤝 Contributing\n\nWe welcome contributions! Please read our [Contributing Guide](./CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project.\n\n### Quick Start for Contributors\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Run tests: `yarn test`\n5. Commit your changes: `git commit -m 'feat: add amazing feature'`\n6. Push to the branch: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n### Development Setup\n\n```bash\n# Clone and setup\ngit clone https://github.com/aaronlamz/navpress.git\ncd navpress\nyarn install\n\n# Start development\nyarn dev\n```\n\n### Report Issues\n\nFound a bug? Have a feature request? Please [create an issue](https://github.com/aaronlamz/navpress/issues) and we'll get back to you!\n\n## 📄 License\n\nMIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🌟 Support\n\nIf you find NavPress helpful, please consider:\n\n- ⭐ Starring this repository\n- 📦 Installing from npm: `npm install -g navpress@latest`\n- 🐛 Reporting bugs or suggesting features\n- 🤝 Contributing code or documentation\n\n---\n\n**Made with ❤️ by [aaronlamz](https://github.com/aaronlamz)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlamz%2Fnavpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronlamz%2Fnavpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlamz%2Fnavpress/lists"}