Skip to content

Commit

Permalink
website: the website is a program
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Jan 3, 2024
1 parent 6ab5955 commit 01bb3fe
Show file tree
Hide file tree
Showing 20 changed files with 1,079 additions and 772 deletions.
1 change: 1 addition & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
api
api_dist/
build/
manual/
15 changes: 6 additions & 9 deletions website/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@ CROSS_PREFIX=raco cross --version ${CROSS_VERSION} --target x86_64-linux

.PHONY: serve
serve:
python -m http.server
raco chief start

.PHONY: deploy
deploy: atom.xml manual/index.html
rsync \
--exclude Makefile \
--exclude api \
--exclude api.rkt \
--exclude api_dist \
--exclude feed.rkt \
-avh . franz:~/www/
deploy: atom.xml build/index.html manual/index.html
rsync -avh build/ franz:~/www/

.PHONY: deploy_api
deploy_api: api_dist/bin/api
rsync -avh api_dist/ franz:~/api/
ssh racksnaps "sudo -S systemctl restart franz-api"

build/%.html: pages/%.rkt
racket build.rkt

manual/index.html: ../manual/*.scrbl
raco scribble --html --dest manual +m ../manual/index.scrbl

Expand Down
2 changes: 2 additions & 0 deletions website/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build: racket main.rkt
server: python -m http.server -d build
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion website/atom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Franz: Native macOS Kafka Client</title><link>https://franz.defn.io</link><description>Franz Releases</description><language>en-US</language><lastBuildDate>Sun, 03 Dec 2023 17:16:15 +0200</lastBuildDate><atom:link rel="self" href="https://franz.defn.io/atom.xml" type="application/rss+xml"></atom:link><item><title>2023.12.03 (Version 1.5, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.5.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.5.0001.universal.dmg</guid><pubDate>Sun, 03 Dec 2023 00:00:00 +0200</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Improvements to Lua error reporting.&lt;/li&gt;&lt;li&gt;Jump to Line in the Scripting Window.&lt;/li&gt;&lt;li&gt;Support for creating, updating and deleting schemas.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Double &amp;amp; triple click to select words in the Scripting Window on
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Franz: Native macOS Kafka Client</title><link>https://franz.defn.io</link><description>Franz Releases</description><language>en-US</language><lastBuildDate>Wed, 03 Jan 2024 17:11:16 +0200</lastBuildDate><atom:link rel="self" href="https://franz.defn.io/atom.xml" type="application/rss+xml"></atom:link><item><title>2024.01.15 (Version 1.6, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.6.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.6.0001.universal.dmg</guid><pubDate>Mon, 15 Jan 2024 00:00:00 +0200</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;The Timestamp Lua class.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Changed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Improved record read throughput &amp;amp; reduced memory utilization.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;macOS: Jump Popover timestamps' seconds components are truncated.&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.12.03 (Version 1.5, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.5.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.5.0001.universal.dmg</guid><pubDate>Sun, 03 Dec 2023 00:00:00 +0200</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Improvements to Lua error reporting.&lt;/li&gt;&lt;li&gt;Jump to Line in the Scripting Window.&lt;/li&gt;&lt;li&gt;Support for creating, updating and deleting schemas.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Double &amp;amp; triple click to select words in the Scripting Window on
Windows and Linux.&lt;/li&gt;&lt;li&gt;Partition starvation issue when jumping to old offsets.&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.11.12 (Version 1.4, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.4.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.4.0001.universal.dmg</guid><pubDate>Sun, 12 Nov 2023 00:00:00 +0200</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Documentation for many new Lua functions.&lt;/li&gt;&lt;li&gt;Improved Lua script error reporting output.&lt;/li&gt;&lt;li&gt;Initial support for rendering data from Lua scripts.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;A crash during update on macOS.&lt;/li&gt;&lt;li&gt;Changelog dark-mode compatibility on macOS.&lt;/li&gt;&lt;li&gt;Improved robustness in the face of errors.&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.10.30 (Version 1.3, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.3.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.3.0001.universal.dmg</guid><pubDate>Mon, 30 Oct 2023 00:00:00 +0200</pubDate><description>&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;SSL Certs can be provided without associated SSL Keys. This makes it
possible to provide custom CA certs without associated keys.&lt;/li&gt;&lt;li&gt;Updates are now checked on boot on Linux and Windows when enabled.&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.10.15 (Version 1.2, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.2.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.2.0001.universal.dmg</guid><pubDate>Sun, 15 Oct 2023 00:00:00 +0300</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Franz for Windows BETA release.&lt;/li&gt;&lt;li&gt;Support for looking up broker and topic config docs.&lt;/li&gt;&lt;li&gt;Support for updating broker and topic configs.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;A memory leak.&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.09.21 (Version 1.1, Build 1)</title><link>https://franz.defn.io/releases/Franz%201.1.0001.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.1.0001.universal.dmg</guid><pubDate>Thu, 21 Sep 2023 00:00:00 +0300</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Support for running scripts on already-loaded data from the
Scripting Window.&lt;/li&gt;&lt;li&gt;Support for connecting to Kafka via an HTTP proxy.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Changed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Franz now requires macOS 13+.&lt;/li&gt;&lt;li&gt;The Jump Popover defaults to "recent" instead of "latest".&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>2023.08.30 (Version 1.0, Build 8)</title><link>https://franz.defn.io/releases/Franz%201.0.0008.universal.dmg</link><guid>https://franz.defn.io/releases/Franz%201.0.0008.universal.dmg</guid><pubDate>Wed, 30 Aug 2023 00:00:00 +0300</pubDate><description>&lt;h2&gt;Added&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Support for providing custom SSL keys and certificates.&lt;/li&gt;&lt;li&gt;Topic partition replication information to the Topic Detail view.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Changed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Group offset reset menu items are disabled for non-empty groups.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Fixed&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Broker metadata loading for topics whose leader nodes are
Expand Down
37 changes: 37 additions & 0 deletions website/build.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#lang racket/base

(require racket/file
racket/path
racket/runtime-path
xml)

(provide
build)

(define-runtime-path assets-dir "assets")
(define-runtime-path atom.xml "atom.xml")
(define-runtime-path build-dir "build")
(define-runtime-path pages-dir "pages")

(define (build)
(delete-directory/files build-dir #:must-exist? #f)
(make-directory* build-dir)
(copy-directory/files assets-dir (build-path build-dir "assets"))
(copy-file atom.xml (build-path build-dir "atom.xml"))
(for ([p (in-directory pages-dir)]
#:unless (regexp-match? #rx#"^\\.#" (file-name-from-path p))
#:when (equal? (path-get-extension p) #".rkt"))
(define-values (_dir name _is-dir?)
(split-path p))
(define target-path
(build-path build-dir (path-replace-extension name #".html")))
(define xexpr
((dynamic-require `(file ,(path->string p)) 'render)))
(call-with-output-file target-path
(lambda (out)
(displayln "<!DOCTYPE HTML>" out)
(parameterize ([current-unescaped-tags html-unescaped-tags])
(write-xexpr xexpr out))))))

(module+ main
(build))
145 changes: 0 additions & 145 deletions website/buy.html

This file was deleted.

Loading

0 comments on commit 01bb3fe

Please sign in to comment.