Initial Homebrew tap setup with automated documentation

- Add formula parser with Ruby AST parsing
- Add GitHub Actions CI/CD workflows
- Add Jekyll-based documentation site
- Add RuboCop and Dependabot configuration
- Add example formula for demonstration
This commit is contained in:
2025-09-02 02:22:26 +03:00
commit 6de65bca11
19 changed files with 1881 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title | default: site.title }}</title>
{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
</head>
<body>
<header class="site-header">
<div class="wrapper">
<h1><a href="{{ '/' | relative_url }}">{{ site.title }}</a></h1>
<nav>
<a href="{{ '/' | relative_url }}">Home</a>
<a href="{{ '/formulae' | relative_url }}">Formulae</a>
<a href="{{ site.repository | prepend: 'https://github.com/' }}">GitHub</a>
</nav>
</div>
</header>
<main class="page-content">
<div class="wrapper">
{{ content }}
</div>
</main>
<footer class="site-footer">
<div class="wrapper">
<p>&copy; {{ 'now' | date: '%Y' }} {{ site.title }}. Built with Jekyll and GitHub Pages.</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,70 @@
---
layout: default
---
{% assign formula = site.data.formulae.formulae | where: "name", page.formula | first %}
<article class="formula-page">
<header class="formula-header">
<h1>{{ formula.name }}</h1>
<div class="formula-meta">
{% if formula.version %}<span class="version">v{{ formula.version }}</span>{% endif %}
{% if formula.license %}<span class="license">{{ formula.license }}</span>{% endif %}
{% if formula.homepage %}<a href="{{ formula.homepage }}" class="homepage">Homepage</a>{% endif %}
</div>
</header>
{% if formula.description %}
<section class="description">
<p>{{ formula.description }}</p>
</section>
{% endif %}
<section class="installation">
<h2>Installation</h2>
<div class="code-block">
<pre><code>brew tap {{ site.repository }}
brew install {{ formula.name }}</code></pre>
</div>
</section>
{% if formula.dependencies.size > 0 %}
<section class="dependencies">
<h2>Dependencies</h2>
<ul class="dep-list">
{% for dep in formula.dependencies %}
<li>{{ dep }}</li>
{% endfor %}
</ul>
</section>
{% endif %}
<section class="details">
<h2>Formula Details</h2>
<table class="formula-details">
{% if formula.url %}
<tr>
<th>Source URL</th>
<td><a href="{{ formula.url }}">{{ formula.url | truncate: 60 }}</a></td>
</tr>
{% endif %}
{% if formula.sha256 %}
<tr>
<th>SHA256</th>
<td><code>{{ formula.sha256 | truncate: 20 }}...</code></td>
</tr>
{% endif %}
<tr>
<th>Last Updated</th>
<td>{{ formula.last_modified | date: "%B %d, %Y" }}</td>
</tr>
</table>
</section>
<section class="source">
<h2>Formula Source</h2>
<p><a href="{{ site.repository | prepend: 'https://github.com/' }}/blob/main/Formula/{{ formula.file_path }}">
View {{ formula.name }}.rb on GitHub
</a></p>
</section>
</article>