Compare commits
No commits in common. "f35116e2762d202e4b865dc0b99c25a09aae56aa" and "bb0554610d29f2e9ba7be3596f1a10416021f8f1" have entirely different histories.
f35116e276
...
bb0554610d
5 changed files with 15 additions and 72 deletions
|
|
@ -57,7 +57,6 @@ First make a copy of the default files:
|
||||||
```bash
|
```bash
|
||||||
cp example.fetch-and-convert.sh fetch-and-convert.sh
|
cp example.fetch-and-convert.sh fetch-and-convert.sh
|
||||||
cp example.deploy.sh deploy.sh
|
cp example.deploy.sh deploy.sh
|
||||||
cp example.hugo.toml hugo.toml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 1. fetch-and-convert.sh
|
### 1. fetch-and-convert.sh
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
SITE_DIR="/path/to/your-cloned-git"
|
|
||||||
WEBROOT="/probably/var/www/html"
|
|
||||||
LOG_FILE="$HOME/nostr-site-deploy.log"
|
|
||||||
|
|
||||||
echo "Last run"
|
|
||||||
date '+%Y-%m-%d %H:%M:%S' > $LOG_FILE # we wipe the log file from rpevious entries, because no history here is super important
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
cd $SITE_DIR
|
|
||||||
/usr/bin/git pull >> $LOG_FILE
|
|
||||||
/usr/bin/bash fetch-and-convert.sh >> $LOG_FILE
|
|
||||||
/snap/bin/hugo --cleanDestinationDir --minify >> $LOG_FILE
|
|
||||||
|
|
||||||
# Optional and potentially dangerous: the generator will creates a random file name (fingerprint) for css and js to be picked up when you do changes to it. If you don't remove them, over time your directory will bloat. A new file is only created if there are changes.
|
|
||||||
# This can be dangerous because if you set the webroot wrong, you're going to nuke stuff you wasn't supposed to.
|
|
||||||
#/usr/bin/rm $WEBROOT/css/*
|
|
||||||
#/usr/bin/rm $WEBROOT/js/*
|
|
||||||
|
|
||||||
/usr/bin/rsync -av $SITE_DIR/public/ $WEBROOT/ >> $LOG_FILE
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
PUBKEY="YOUR_PUBKEY"
|
|
||||||
RELAY="wss://mega.supercool.relay"
|
|
||||||
DATA_DIR="data"
|
|
||||||
|
|
||||||
# Clean up old JSON files (optional)
|
|
||||||
# rm -f data/*/*.json
|
|
||||||
|
|
||||||
# Define kind mappings
|
|
||||||
declare -A KINDS
|
|
||||||
KINDS[0]="profile/profile"
|
|
||||||
KINDS[30023]="longform/blog"
|
|
||||||
KINDS[36787]="music/tracks"
|
|
||||||
KINDS[20]="pictures/photos"
|
|
||||||
KINDS[22]="videos/videos"
|
|
||||||
|
|
||||||
# Fetch each kind
|
|
||||||
for kind in "${!KINDS[@]}"; do
|
|
||||||
output="${KINDS[$kind]}"
|
|
||||||
echo "Fetching kind $kind..."
|
|
||||||
|
|
||||||
# Create directory if it doesn't exist
|
|
||||||
mkdir -p "$DATA_DIR/$(dirname "$output")"
|
|
||||||
|
|
||||||
# Fetch and convert to JSON
|
|
||||||
nak req -k "$kind" -a "$PUBKEY" "$RELAY" | jq -s '.' > "$DATA_DIR/$output.json"
|
|
||||||
|
|
||||||
echo "Saved to $DATA_DIR/$output.json"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All data fetched and converted!"
|
|
||||||
echo "JSONL files have been removed."
|
|
||||||
|
|
||||||
echo "Building website"
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
baseURL = "https://your-domain.com"
|
|
||||||
locale = "en-us"
|
|
||||||
title = "Your Site"
|
|
||||||
theme = "one-pager"
|
|
||||||
disableKinds = ["sitemap", "taxonomy", "term"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
sitename = "Your Site"
|
|
||||||
description = "Your site description"
|
|
||||||
headerImage = "/path/to/fallback/headerimage.jpg"
|
|
||||||
|
|
||||||
[permalinks]
|
|
||||||
page = "/:contentbasename/"
|
|
||||||
15
hugo.toml
Normal file
15
hugo.toml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
baseURL = "https://setto.basspistol.com"
|
||||||
|
locale = "en-us"
|
||||||
|
title = "Settolino Malandrino"
|
||||||
|
theme = "one-pager"
|
||||||
|
disableKinds = ["sitemap", "taxonomy", "term"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
sitename = "My Site"
|
||||||
|
description = "Set, Party, Gang 徒 setto セット"
|
||||||
|
headerImage = "/images/header.jpg"
|
||||||
|
|
||||||
|
[permalinks]
|
||||||
|
page = "/:contentbasename/"
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue