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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ kopynpaste-*.tar
npm-debug.log
/assets/node_modules/

# Hugo website output and generated resources.
/website/public/
/website/resources/_gen/
/website/.hugo_build.lock

/.direnv/
/.nix/

Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
dev:
mix phx.server

.PHONY: website-dev
website-dev:
hugo server --source website --buildDrafts --disableFastRender

.PHONY: website-build
website-build:
hugo --source website --minify --cleanDestinationDir

.PHONY: website-clean
website-clean:
rm -rf website/public website/resources/_gen website/.hugo_build.lock

.PHONY: test
test: ex-test rs-test

Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
shfmt
shellcheck
git-cliff
hugo
postgresql
] ++ lib.optionals stdenv.isLinux [ inotify-tools ];

Expand Down
38 changes: 38 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Textbin website

This directory is the Hugo source for Textbin's public website. It is
intentionally separate from the Phoenix application: Cloudflare Pages builds
and serves this site, while the stateful application still requires a BEAM
runtime, PostgreSQL, and a storage backend.

The site uses custom Hugo layouts and Hugo Pipes rather than a third-party theme
or JavaScript frontend. Product demonstrations are semantic HTML and CSS so
they stay responsive and do not drift from the public product description.

## Development

From the repository root, enter the Nix development shell and use the website
targets:

```sh
nix develop
make website-dev
make website-build
make website-clean
```

`website-build` writes the production site to `website/public` with minified,
fingerprinted CSS. Generated output is not committed.

## Cloudflare Pages

The `textbin` Pages project deploys this repository with:

- production branch: `main`
- root directory: `website`
- build command: `hugo --minify`
- build output directory: `public`
- environment variable: `HUGO_VERSION=0.164.0` in preview and production

Cloudflare applies the response headers in `static/_headers` after Hugo copies
them into the build output.
Loading
Loading