forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzola.rb
53 lines (44 loc) · 2.12 KB
/
zola.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class Zola < Formula
desc "Fast static site generator in a single binary with everything built-in"
homepage "https://www.getzola.org/"
url "https://github.com/getzola/zola/archive/refs/tags/v0.19.2.tar.gz"
sha256 "bae10101b4afff203f781702deeb0a60d3ab0c9f0c7a616a7c1e0c504c33c93f"
license "MIT"
bottle do
sha256 cellar: :any, arm64_sequoia: "4d79830a96d63b13b20a05393bf1c194e6d0b66f56e35afe53257d284cf09a25"
sha256 cellar: :any, arm64_sonoma: "72884ca2fcf1d9eb26232eacb7efc63597b801e4913b7acffc7feae396357ed5"
sha256 cellar: :any, arm64_ventura: "8a28ce287dcc749f5e812497c440ca7a5d6a2106edc88f2dbb196c5af811ffd4"
sha256 cellar: :any, arm64_monterey: "ddb05cbd1b7fe5748812a1033b8c0f7f8377108fdfef24446a5c24c792bb6805"
sha256 cellar: :any, sonoma: "5e1e6570eb4082022a4e66a7afd7e37121b45515e424d7eaa9ff6461b5353c69"
sha256 cellar: :any, ventura: "cdccf85bcced67724481b34256bc4670031c3e173b4196fdde3f3bf7e648cc35"
sha256 cellar: :any, monterey: "f220936fb8f77a80d66dc6bac486c95039abe1f498de0c2edaa70a8113714b49"
sha256 cellar: :any_skip_relocation, x86_64_linux: "9d6138aa7ff35d309d8c8a3c17ab9552bb8b9465427701fc7cf5d869c2c6e940"
end
depends_on "pkgconf" => :build
depends_on "rust" => :build
depends_on "oniguruma" # for onig_sys
on_linux do
depends_on "openssl@3" # Uses Secure Transport on macOS
end
def install
ENV["RUSTONIG_SYSTEM_LIBONIG"] = "1"
system "cargo", "install", "--features", "native-tls", *std_cargo_args
generate_completions_from_executable(bin/"zola", "completion")
end
test do
system "yes '' | #{bin}/zola init mysite"
(testpath/"mysite/content/blog/_index.md").write <<~MARKDOWN
+++
+++
Hi I'm Homebrew.
MARKDOWN
(testpath/"mysite/templates/section.html").write <<~HTML
{{ section.content | safe }}
HTML
cd testpath/"mysite" do
system bin/"zola", "build"
end
assert_equal "<p>Hi I'm Homebrew.</p>",
(testpath/"mysite/public/blog/index.html").read.strip
end
end