Skip to content

Commit f376673

Browse files
Enhance build process with advanced static site generation
- Implement comprehensive content extraction from app directory - Create more robust and visually appealing static site generation - Add dynamic section and metadata parsing from page and layout files - Improve fallback content generation for static export - Enhance CSS styling for static HTML output - Refactor build script to create more informative static site
1 parent a0239f2 commit f376673

File tree

2 files changed

+263
-159
lines changed

2 files changed

+263
-159
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ jobs:
8181
free -m
8282
df -h
8383
84-
- name: Emergency build process 🏗️
84+
- name: Build process 🏗️
8585
run: |
86-
echo "Starting emergency build process..."
86+
echo "Starting optimized build process..."
8787
# Use Node.js with reasonable memory limit
8888
NODE_OPTIONS="--max-old-space-size=6144" node build.js
8989
env:
@@ -102,11 +102,18 @@ jobs:
102102
if [ ! -d "out" ] || [ -z "$(ls -A out)" ]; then
103103
echo "Output directory is missing or empty, creating emergency fallback"
104104
mkdir -p out
105+
mkdir -p out/css
106+
107+
# Create simple CSS
108+
echo "body { font-family: sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; }
109+
h1 { color: #333; }
110+
a { color: #0070f3; }
111+
.container { background: white; padding: 20px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }" > out/css/styles.css
105112
106113
# Create simple emergency HTML files
107114
node -e "
108115
const fs = require('fs');
109-
const html = '<html><head><title>Lucas Becker</title></head><body><h1>Lucas Becker</h1><p>Site is being updated. Please check back soon.</p><p><a href=\"https://github.com/lucasbecker-dev\">GitHub Profile</a></p></body></html>';
116+
const html = '<!DOCTYPE html><html><head><title>Lucas Becker</title><link rel=\"stylesheet\" href=\"css/styles.css\"></head><body><div class=\"container\"><h1>Lucas Becker</h1><p>Site is being updated. Please check back soon.</p><p><a href=\"https://github.com/lucasbecker-dev\">GitHub Profile</a></p></div></body></html>';
110117
fs.writeFileSync('out/index.html', html);
111118
fs.writeFileSync('out/404.html', html);
112119
console.log('Created emergency HTML files');
@@ -115,6 +122,9 @@ jobs:
115122
116123
# List contents of out directory
117124
ls -la out/
125+
if [ -d "out/css" ]; then
126+
ls -la out/css/
127+
fi
118128
119129
- name: Upload artifact 📡
120130
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)