Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ go.work
# Build directories
/bin/
/dist/
_site/
.jekyll-cache/

# AI agent artifacts
.aider-desk/
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ When Milestone 5 designates `pkg/scan.Engine` as canonical, this CLI will be upd
8. **GoReleaser Schema Compatibility & Deprecations.** Always run `goreleaser check` when editing `.goreleaser.yml`. Use GoReleaser v2 non-deprecated schema properties (`archives[].ids` instead of `builds`, `homebrew_casks` instead of `brews`).
9. **Pin Third-Party GitHub Actions to Commit SHA.** All third-party GitHub Actions (outside `actions/*`) MUST be pinned to a full 40-character commit SHA (e.g., `golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0`) to satisfy Codacy and SAST security compliance.
10. **Pull Requests MUST target `develop`.** All PRs created by developers or AI agents MUST target the `develop` branch. Never create or direct PRs directly to `main` (only automated release PRs from `github-actions[bot]` merge `develop` into `main`).
11. **Landing Page Modifications Approval.** Any modifications to the GitHub Pages landing page (`docs/`) must only be made after explicit review and approval by a real human user.



---
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed
- Improved GitHub Pages landing page (`docs/`): added discreet code copy buttons (`.copy-btn`) with inline visual feedback, replaced confusing source zip/tarball download CTAs with "Latest Release" link, and relocated status badges (Release, CI, License) below the tagline hero banner.
- Updated project landing page (`docs/index.md`) with official Homebrew (`catnet-io/tap/catnet`) and Scoop (`catnet-io/scoop-bucket`) package manager installation options in the 30-second quick install section.

### Added
- Added Rule 11 in `AGENTS.md` requiring explicit human user review and approval for any landing page (`docs/`) modifications.

### Fixed
- Fixed GitHub Pages navigation link in `docs/_config.yml` to use site baseurl `/catnet/` path instead of root domain path (`/`).
- Clarified `--output` flag description and added `catnet export` subcommand flag reference table in `docs/index.md`.
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
baseurl: "/catnet"
url: "https://catnet-io.github.io"
theme: jekyll-theme-cayman
show_downloads: true
show_downloads: false
github:
repository_url: https://github.com/catnet-io/catnet
navigation:
Expand Down
122 changes: 122 additions & 0 deletions docs/_includes/head-custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,125 @@

<!-- Setup Google Analytics -->
{% include head-custom-google-analytics.html %}

<!-- Copy Code Button Styles & Script -->
<style>
div.highlighter-rouge {
position: relative;
}
.copy-btn {
position: absolute;
top: 8px;
right: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
background: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 6px;
color: #475569;
cursor: pointer;
opacity: 0.35;
transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
z-index: 10;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.highlighter-rouge:hover .copy-btn,
.copy-btn:focus,
.copy-btn.copied {
opacity: 1;
}
.copy-btn:hover {
background: #ffffff;
color: #0f172a;
border-color: rgba(0, 0, 0, 0.3);
}
.copy-btn.copied {
color: #16a34a;
border-color: #16a34a;
background: #f0fdf4;
}
.copy-btn svg {
width: 15px;
height: 15px;
pointer-events: none;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
var iconCopy = '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>';
var iconCheck = '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>';

function copyToClipboard(text) {
if (navigator && navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
return navigator.clipboard.writeText(text);
}
return new Promise(function (resolve, reject) {
try {
var textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.left = '-9999px';
textArea.style.top = '-9999px';
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
var successful = document.execCommand('copy');
document.body.removeChild(textArea);
if (successful) {
resolve();
} else {
reject(new Error('execCommand copy failed'));
}
} catch (err) {
reject(err);
}
});
}

var blocks = document.querySelectorAll('div.highlighter-rouge');
blocks.forEach(function (block) {
if (block.querySelector('.copy-btn')) return;
var btn = document.createElement('button');
btn.className = 'copy-btn';
btn.type = 'button';
btn.setAttribute('aria-label', 'Copy code to clipboard');
btn.setAttribute('title', 'Copy');
btn.innerHTML = iconCopy;

btn.addEventListener('click', function () {
var codeEl = block.querySelector('code') || block.querySelector('pre');
var text = '';
if (codeEl) {
text = codeEl.textContent;
} else {
var clone = block.cloneNode(true);
var existingBtn = clone.querySelector('.copy-btn');
if (existingBtn) existingBtn.remove();
text = clone.textContent;
}

copyToClipboard(text).then(function () {
btn.innerHTML = iconCheck;
btn.setAttribute('title', 'Copied!');
btn.setAttribute('aria-label', 'Copied!');
btn.classList.add('copied');
setTimeout(function () {
btn.innerHTML = iconCopy;
btn.setAttribute('title', 'Copy');
btn.setAttribute('aria-label', 'Copy code to clipboard');
btn.classList.remove('copied');
}, 2000);
}).catch(function (err) {
console.error('Failed to copy code: ', err);
});
});

block.appendChild(btn);
});
});
</script>

36 changes: 36 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">

{% seo %}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
{% include head-custom.html %}
</head>
<body>
<a id="skip-to-content" href="#content">Skip to the content.</a>

<header class="page-header" role="banner">
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
<a href="https://github.com/catnet-io/catnet/releases/latest" class="btn">Latest Release</a>
<a href="{{ site.github.repository_url | default: 'https://github.com/catnet-io/catnet' }}" class="btn">View on GitHub</a>
</header>

<main id="content" class="main-content" role="main">
{{ content }}

<footer class="site-footer">
{% if site.github.is_project_page %}
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
{% endif %}
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</main>
</body>
</html>
10 changes: 4 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: A fast, scriptable network scanner for the command line. Built in G

> **catnet** — A fast, scriptable network scanner for the command line. Built in Go. Zero engine dependencies. Made for pipelines.

[![Release](https://img.shields.io/github/v/release/catnet-io/catnet)](https://github.com/catnet-io/catnet/releases)
[![CI](https://github.com/catnet-io/catnet/actions/workflows/ci.yml/badge.svg)](https://github.com/catnet-io/catnet/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## What catnet does

| 🔍 Discover | 🔒 Enumerate | 📤 Export |
Expand Down Expand Up @@ -116,12 +120,6 @@ CatNet is a complete network scanning suite designed for terminal users, automat

---

## Badges & Status

[![Release](https://img.shields.io/github/v/release/catnet-io/catnet)](https://github.com/catnet-io/catnet/releases)
[![CI](https://github.com/catnet-io/catnet/actions/workflows/ci.yml/badge.svg)](https://github.com/catnet-io/catnet/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

- [Full documentation on the Wiki](https://github.com/catnet-io/catnet/wiki)
- [GitHub Repository](https://github.com/catnet-io/catnet)
- [Report an Issue](https://github.com/catnet-io/catnet/issues/new)