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:
```
```bash
cp exemple.fetch-and-convert.sh fetch-and-convert.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.
```
```bash
#!/bin/sh
# Configuration
@ -132,7 +132,7 @@ cd $SITE_DIR
### 3. Make scripts executable
```
```bash
chmod +x fetch-and-convert.sh
chmod +x deploy.sh
```
@ -149,7 +149,7 @@ crontab -e
Alternative: Different intervals
```
```bash
# Every 15 minutes
*/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.
```
```toml
baseURL = "https://your-domain.com"
locale = "en-us"
title = "Your Site"
@ -186,13 +186,13 @@ disableKinds = ["sitemap", "taxonomy", "term"]
Verify the site was updated
```
```bash
# Check the build time in the footer
curl -s https://your-domain.com | grep "Last updated"
```
View the status of the cron job
```
```bash
# Check if cron is running
systemctl status cron
# or
@ -206,13 +206,13 @@ grep CRON /var/log/syslog
To manually trigger a deployment:
```
```bash
cd /path/to/your-cloned-git
./deploy.sh
```
To test fetching data without full deployment:
```
```bash
cd /path/to/your-cloned-git
./fetch-and-convert.sh
hugo server -D
@ -223,7 +223,7 @@ hugo server -D
Common Issues
### 1. Hugo build fails
```
```bash
# Check the error
hugo --verbose
@ -236,7 +236,7 @@ ls -la data/*/*.json
### 2. nak fetch fails
```
```bash
# Test nak manually
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
```
```bash
# Check permissions
ls -la /var/www/html
@ -257,7 +257,7 @@ sudo chown -R www-data:www-data /var/www/html
```
### 4. Cron job not running
```
```bash
# Check cron syntax
crontab -l
@ -269,7 +269,7 @@ grep CRON /var/log/syslog
```
### 5. Empty data files
```
```bash
# Check if data was fetched
cat data/profile/profile.json | jq '.[0]'
@ -292,15 +292,13 @@ ls -lh data/*/*.json
🔐 Security Tips
Restrict access to the site directory:
```
```bash
chmod 750 /var/www/your-site
chmod 750 /var/www/your-site/deploy.sh
```
Regularly update Hugo and nak:
```
```bash
# Check for updates
hugo version
nak --version
```
✅ Quick Start Checklist