Skip to content

Commit d731e00

Browse files
committed
Added all of the website
In the end I made it with Alpine.js because I'm dumb and impatient. Hopefully AI will teach how to use github actions without breaking my site
1 parent 6acb3c0 commit d731e00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3248
-2
lines changed

.data/content/contents.sqlite

244 KB
Binary file not shown.

.env.example

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Environment Variables Example
2+
# Copy this file to .env and fill in your actual values
3+
# NEVER commit the .env file to git!
4+
5+
# Site Configuration
6+
SITE_URL=https://webdevsam.io
7+
SITE_NAME=webdevsam.io
8+
9+
# Contact Form (if you add backend functionality later)
10+
# CONTACT_EMAIL=sam@webdevsam.io
11+
# SMTP_HOST=
12+
# SMTP_PORT=
13+
# SMTP_USER=
14+
# SMTP_PASS=
15+
16+
# Analytics (if you add Google Analytics)
17+
# GA_TRACKING_ID=
18+
19+
# API Keys (if you integrate any APIs)
20+
# EXAMPLE_API_KEY=
21+
# EXAMPLE_API_SECRET=
22+
23+
# Development
24+
# NODE_ENV=development

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI - Validate Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Validate HTML files
21+
run: |
22+
echo "Checking for HTML syntax issues..."
23+
find . -name "*.html" -type f ! -path "*/.*" | while read file; do
24+
echo "Checking $file"
25+
# Basic HTML validation - check for common issues
26+
if ! grep -q "<!DOCTYPE html>" "$file" 2>/dev/null; then
27+
echo "⚠️ Warning: $file missing DOCTYPE declaration"
28+
fi
29+
done
30+
echo "✓ HTML validation complete"
31+
32+
- name: Check for sensitive data
33+
run: |
34+
echo "Scanning for potential sensitive data..."
35+
# Check for common sensitive patterns (excluding this check itself)
36+
if grep -r -i "password" --include="*.html" --include="*.js" --exclude-dir=".git" --exclude-dir=".github" . | grep -v "type=\"password\"" | grep -v "placeholder" | grep -v "Password" | grep -v "github/workflows"; then
37+
echo "⚠️ Warning: Found 'password' references - please review"
38+
fi
39+
if grep -r -i "api[_-]key" --include="*.html" --include="*.js" --exclude-dir=".git" --exclude-dir=".github" .; then
40+
echo "❌ Error: Found potential API keys in code"
41+
exit 1
42+
fi
43+
if grep -r -i "secret" --include="*.html" --include="*.js" --exclude-dir=".git" --exclude-dir=".github" . | grep -v "secrets." | grep -v "github/workflows"; then
44+
echo "⚠️ Warning: Found 'secret' references - please review"
45+
fi
46+
echo "✓ Sensitive data check complete"
47+
48+
- name: Validate links structure
49+
run: |
50+
echo "Checking for broken internal links..."
51+
# Check that referenced pages exist
52+
for page in index.html pages/home.html pages/blog.html pages/work.html pages/services.html pages/contact.html pages/404.html; do
53+
if [ -f "$page" ]; then
54+
echo "✓ Found $page"
55+
else
56+
echo "❌ Missing $page"
57+
exit 1
58+
fi
59+
done
60+
echo "✓ Link structure validation complete"
61+
62+
- name: Check file sizes
63+
run: |
64+
echo "Checking for large files..."
65+
find . -type f ! -path "*/.*" -size +5M -exec ls -lh {} \; | awk '{print "⚠️ Large file: " $9 " (" $5 ")"}'
66+
echo "✓ File size check complete"

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to DreamHost
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch: # Allows manual trigger
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Deploy to DreamHost via SFTP
18+
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
19+
with:
20+
server: ${{ secrets.FTP_SERVER }}
21+
username: ${{ secrets.FTP_USERNAME }}
22+
password: ${{ secrets.FTP_PASSWORD }}
23+
local-dir: ./
24+
server-dir: ./
25+
dangerous-clean-slate: false
26+
exclude: |
27+
**/.git*
28+
**/.git*/**
29+
**/.github/**
30+
**/.vscode/**
31+
**/.idea/**
32+
**/node_modules/**
33+
**/.env*
34+
**/*.log
35+
**/README.md
36+
**/NOTES.md
37+
**/TODO.md
38+
**/.DS_Store
39+
**/Thumbs.db

.gitignore

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Operating System Files
2+
.DS_Store
3+
.DS_Store?
4+
._*
5+
.Spotlight-V100
6+
.Trashes
7+
ehthumbs.db
8+
Thumbs.db
9+
Desktop.ini
10+
11+
# Editor and IDE Files
12+
.vscode/
13+
.idea/
14+
*.swp
15+
*.swo
16+
*~
17+
.project
18+
.settings/
19+
*.sublime-project
20+
*.sublime-workspace
21+
22+
# Environment Variables and Secrets
23+
.env
24+
.env.local
25+
.env.*.local
26+
*.key
27+
*.pem
28+
secrets.json
29+
30+
# Logs
31+
logs/
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
pnpm-debug.log*
37+
38+
# Temporary Files
39+
*.tmp
40+
*.temp
41+
.cache/
42+
.temp/
43+
44+
# Backup Files
45+
*.bak
46+
*.backup
47+
*~
48+
49+
# FTP/SFTP Configuration (if you have local FTP clients)
50+
.ftpconfig
51+
sftp-config.json
52+
deployment-config.json
53+
54+
# Local Development
55+
.local/
56+
local/
57+
58+
# Git Attributes
59+
.gitattributes
60+
61+
# Personal Notes (if you keep any in the repo)
62+
NOTES.md
63+
TODO.md
64+
.notes/
65+
66+
# Build artifacts (if you ever add a build process)
67+
dist/
68+
build/
69+
.output/
70+
.nuxt/
71+
node_modules/
72+
73+
# Testing
74+
coverage/
75+
.nyc_output/
76+
77+
# Optional: Exclude draft content
78+
content/drafts/
79+
**/draft-*.md

.htaccess

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# .htaccess for webdevsam.io
2+
# SEO and Performance Optimizations
3+
4+
# Enable Rewrite Engine
5+
<IfModule mod_rewrite.c>
6+
RewriteEngine On
7+
RewriteBase /
8+
9+
# Force HTTPS
10+
RewriteCond %{HTTPS} off
11+
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
12+
13+
# Remove www (or add www if you prefer)
14+
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
15+
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
16+
17+
# SPA Routing - Redirect all requests to index.html
18+
RewriteCond %{REQUEST_FILENAME} !-f
19+
RewriteCond %{REQUEST_FILENAME} !-d
20+
RewriteRule ^(.*)$ /index.html [L]
21+
</IfModule>
22+
23+
# GZIP Compression
24+
<IfModule mod_deflate.c>
25+
AddOutputFilterByType DEFLATE text/html
26+
AddOutputFilterByType DEFLATE text/css
27+
AddOutputFilterByType DEFLATE text/javascript
28+
AddOutputFilterByType DEFLATE text/xml
29+
AddOutputFilterByType DEFLATE text/plain
30+
AddOutputFilterByType DEFLATE application/javascript
31+
AddOutputFilterByType DEFLATE application/x-javascript
32+
AddOutputFilterByType DEFLATE application/json
33+
AddOutputFilterByType DEFLATE application/xml
34+
AddOutputFilterByType DEFLATE application/xhtml+xml
35+
AddOutputFilterByType DEFLATE application/rss+xml
36+
AddOutputFilterByType DEFLATE application/atom_xml
37+
AddOutputFilterByType DEFLATE image/svg+xml
38+
</IfModule>
39+
40+
# Browser Caching
41+
<IfModule mod_expires.c>
42+
ExpiresActive On
43+
44+
# Images
45+
ExpiresByType image/jpeg "access plus 1 year"
46+
ExpiresByType image/jpg "access plus 1 year"
47+
ExpiresByType image/png "access plus 1 year"
48+
ExpiresByType image/gif "access plus 1 year"
49+
ExpiresByType image/svg+xml "access plus 1 year"
50+
ExpiresByType image/webp "access plus 1 year"
51+
ExpiresByType image/x-icon "access plus 1 year"
52+
53+
# CSS and JavaScript
54+
ExpiresByType text/css "access plus 1 month"
55+
ExpiresByType application/javascript "access plus 1 month"
56+
ExpiresByType text/javascript "access plus 1 month"
57+
58+
# Fonts
59+
ExpiresByType font/woff "access plus 1 year"
60+
ExpiresByType font/woff2 "access plus 1 year"
61+
ExpiresByType application/font-woff "access plus 1 year"
62+
ExpiresByType application/font-woff2 "access plus 1 year"
63+
64+
# HTML
65+
ExpiresByType text/html "access plus 0 seconds"
66+
67+
# Default
68+
ExpiresDefault "access plus 1 month"
69+
</IfModule>
70+
71+
# Security Headers
72+
<IfModule mod_headers.c>
73+
# X-Frame-Options
74+
Header always set X-Frame-Options "SAMEORIGIN"
75+
76+
# X-Content-Type-Options
77+
Header always set X-Content-Type-Options "nosniff"
78+
79+
# X-XSS-Protection
80+
Header always set X-XSS-Protection "1; mode=block"
81+
82+
# Referrer Policy
83+
Header always set Referrer-Policy "strict-origin-when-cross-origin"
84+
85+
# Permissions Policy
86+
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
87+
88+
# Content Security Policy (adjust as needed)
89+
# Header always set Content-Security-Policy "default-src 'self' https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.tailwindcss.com https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com; img-src 'self' data: https:; font-src 'self' data: https:;"
90+
</IfModule>
91+
92+
# Prevent Directory Browsing
93+
Options -Indexes
94+
95+
# Custom Error Pages (create these if needed)
96+
# ErrorDocument 404 /404.html
97+
# ErrorDocument 500 /500.html
98+
99+
# MIME Types
100+
<IfModule mod_mime.c>
101+
AddType application/javascript js
102+
AddType text/css css
103+
AddType image/svg+xml svg svgz
104+
AddType application/font-woff woff
105+
AddType application/font-woff2 woff2
106+
AddType application/json json
107+
AddType application/manifest+json webmanifest
108+
</IfModule>
109+
110+
# UTF-8 Encoding
111+
AddDefaultCharset UTF-8
112+
<IfModule mod_mime.c>
113+
AddCharset UTF-8 .html .css .js .xml .json .rss .atom
114+
</IfModule>

0 commit comments

Comments
 (0)