Source code for my gallery webpage. https://gallery.badmanners.xyz
Find a file
2024-09-13 22:36:39 -03:00
.vscode Add syndication links and start blog collection 2024-09-13 10:56:42 -03:00
examples Start creating blog posts 2024-09-13 22:36:39 -03:00
public Block bots 2024-09-04 18:10:14 -03:00
scripts Final touches to the facelift 2024-09-07 18:02:53 -03:00
src Start creating blog posts 2024-09-13 22:36:39 -03:00
.gitignore Migrate deploy-lftp script to tsx 2024-07-18 19:18:09 -03:00
.prettierignore Bring over improvements from badmanners.xyz 2024-08-20 15:36:48 -03:00
.prettierrc.mjs Fix up first version and add Prettier and Docker 2024-03-20 11:34:09 -03:00
astro.config.mjs Block bots 2024-09-04 18:10:14 -03:00
LICENSE.md Update navbar in GalleryLayout and add astro-htaccess 2024-08-30 17:50:38 -03:00
package-lock.json Add Tippy.js tooltips to focusable elements 2024-09-07 18:30:46 -03:00
package.json Add Tippy.js tooltips to focusable elements 2024-09-07 18:30:46 -03:00
README.md Better microformats support and add PUBLISH_DRAFTS envvar 2024-08-16 21:46:32 -03:00
tailwind.config.mjs Start creating blog posts 2024-09-13 22:36:39 -03:00
tsconfig.json Several minor improvements to typing and misc. 2024-08-07 19:31:38 -03:00

gallery.badmanners.xyz

Static website built in Astro + Typescript + TailwindCSS.

Requirements

  • Node.js 20+
  • (optional) rsync or LFTP, for remote deployment.
  • (optional) LibreOffice, for the story export script.

Development

Setup

git clone https://git.badmanners.xyz/badmanners/gallery.badmanners.xyz
cd gallery.badmanners.xyz
npm install

Local development

npm run dev       # Start development server (quit with Ctrl-C)
npm run sync      # Rebuild types from Astro config and src/content/ files
npm run prettier  # Prettier formatting

Configuration

The following optional environment variables can be set within a .env file:

Name Type Description
APACHE_CONFIG boolean If set to true, generates an .htaccess Apache config file at the root of the output directory.
PUBLISH_DRAFTS boolean If set to true, includes drafts in the production build. Published drafts still won't be directly indexed by any other pages.

Export story for upload

Requires libreoffice to be installed and in your path.

npm run export-story -- -o ~/Documents/TO_UPLOAD slug-for-story-to-export

Build and deploy to remote

npm run build

Then, if you're using rsync, after configuring the gallerybm host (or the name of your choosing) in ~/.ssh/config, you can use a command like:

rsync --delete-after -acP dist/ gallerybm:/home/public

Or if you prefer LFTP, create a .env file at the root of the project:

DEPLOY_LFTP_HOST=https://example-webdav-server.com
DEPLOY_LFTP_USER=example_user
DEPLOY_LFTP_PASSWORD=sup3r_s3cr3t_password
DEPLOY_LFTP_TARGETFOLDER=sites/gallery.badmanners.xyz/

Then run npm run deploy-lftp.