fomratting thingies

This commit is contained in:
sakrecoer 2026-07-31 11:36:42 +02:00
parent 85db71980c
commit da265d04fa

View file

@ -56,7 +56,7 @@ This should be present in your system already, but who knows... It is definitely
First make a copy of the default files: First make a copy of the default files:
``` ```bash
cp exemple.fetch-and-convert.sh fetch-and-convert.sh cp exemple.fetch-and-convert.sh fetch-and-convert.sh
cp exemple.deploy.sh deploy.sh cp exemple.deploy.sh deploy.sh
``` ```
@ -106,7 +106,7 @@ echo "All data fetched and converted!"
This script handles the full deployment process. You can do this more elegantly, but yeah... this is what i got. This script handles the full deployment process. You can do this more elegantly, but yeah... this is what i got.
``` ```bash
#!/bin/sh #!/bin/sh
# Configuration # Configuration
@ -132,7 +132,7 @@ cd $SITE_DIR
### 3. Make scripts executable ### 3. Make scripts executable
``` ```bash
chmod +x fetch-and-convert.sh chmod +x fetch-and-convert.sh
chmod +x deploy.sh chmod +x deploy.sh
``` ```
@ -149,7 +149,7 @@ crontab -e
Alternative: Different intervals Alternative: Different intervals
``` ```bash
# Every 15 minutes # Every 15 minutes
*/15 * * * * /path/to/your-cloned-git/deploy.sh */15 * * * * /path/to/your-cloned-git/deploy.sh
@ -167,7 +167,7 @@ Alternative: Different intervals
Hugo Configuration (hugo.toml) has some fallback values you might want to edit. These will take effect if something goes wrong with nostr data at fetch time. Hugo Configuration (hugo.toml) has some fallback values you might want to edit. These will take effect if something goes wrong with nostr data at fetch time.
``` ```toml
baseURL = "https://your-domain.com" baseURL = "https://your-domain.com"
locale = "en-us" locale = "en-us"
title = "Your Site" title = "Your Site"
@ -186,13 +186,13 @@ disableKinds = ["sitemap", "taxonomy", "term"]
Verify the site was updated Verify the site was updated
``` ```bash
# Check the build time in the footer # Check the build time in the footer
curl -s https://your-domain.com | grep "Last updated" curl -s https://your-domain.com | grep "Last updated"
``` ```
View the status of the cron job View the status of the cron job
``` ```bash
# Check if cron is running # Check if cron is running
systemctl status cron systemctl status cron
# or # or
@ -206,13 +206,13 @@ grep CRON /var/log/syslog
To manually trigger a deployment: To manually trigger a deployment:
``` ```bash
cd /path/to/your-cloned-git cd /path/to/your-cloned-git
./deploy.sh ./deploy.sh
``` ```
To test fetching data without full deployment: To test fetching data without full deployment:
``` ```bash
cd /path/to/your-cloned-git cd /path/to/your-cloned-git
./fetch-and-convert.sh ./fetch-and-convert.sh
hugo server -D hugo server -D
@ -223,7 +223,7 @@ hugo server -D
Common Issues Common Issues
### 1. Hugo build fails ### 1. Hugo build fails
``` ```bash
# Check the error # Check the error
hugo --verbose hugo --verbose
@ -236,7 +236,7 @@ ls -la data/*/*.json
### 2. nak fetch fails ### 2. nak fetch fails
``` ```bash
# Test nak manually # Test nak manually
nak req -k 0 -p YOUR_PUBKEY wss://relay.damus.io | head -5 nak req -k 0 -p YOUR_PUBKEY wss://relay.damus.io | head -5
@ -248,7 +248,7 @@ nak req -k 0 -p YOUR_PUBKEY wss://nos.lol
``` ```
### 3. Rsync permissions issues ### 3. Rsync permissions issues
``` ```bash
# Check permissions # Check permissions
ls -la /var/www/html ls -la /var/www/html
@ -257,7 +257,7 @@ sudo chown -R www-data:www-data /var/www/html
``` ```
### 4. Cron job not running ### 4. Cron job not running
``` ```bash
# Check cron syntax # Check cron syntax
crontab -l crontab -l
@ -269,7 +269,7 @@ grep CRON /var/log/syslog
``` ```
### 5. Empty data files ### 5. Empty data files
``` ```bash
# Check if data was fetched # Check if data was fetched
cat data/profile/profile.json | jq '.[0]' cat data/profile/profile.json | jq '.[0]'
@ -292,15 +292,13 @@ ls -lh data/*/*.json
🔐 Security Tips 🔐 Security Tips
Restrict access to the site directory: Restrict access to the site directory:
``` ```bash
chmod 750 /var/www/your-site chmod 750 /var/www/your-site
chmod 750 /var/www/your-site/deploy.sh chmod 750 /var/www/your-site/deploy.sh
``` ```
Regularly update Hugo and nak: Regularly update Hugo and nak:
``` ```bash
# Check for updates # Check for updates
hugo version hugo version
nak --version nak --version
``` ```
✅ Quick Start Checklist