mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-09-14 09:35:04 +00:00
Add validation and testing for ghost content extraction
- Create validation script to verify implementation - Add test file for ghost profile rendering - Validate all components work together correctly - Ready for CI/CD pipeline testing
This commit is contained in:
34
test-ghost-profile.md
Normal file
34
test-ghost-profile.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Test Ghost Profile Output
|
||||||
|
|
||||||
|
This is a test document to validate our ghost profile setup.
|
||||||
|
|
||||||
|
## Content Structure
|
||||||
|
|
||||||
|
The ghost profile should:
|
||||||
|
- Remove navigation elements
|
||||||
|
- Use minimal styling from ghost-iframe.css
|
||||||
|
- Maintain clean article layout
|
||||||
|
- Remove table of contents
|
||||||
|
|
||||||
|
## Code Example
|
||||||
|
|
||||||
|
```julia
|
||||||
|
println("Hello from Julia!")
|
||||||
|
x = 1 + 1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Regular Content
|
||||||
|
|
||||||
|
This is just some regular markdown content to see how it renders in the ghost profile.
|
||||||
|
|
||||||
|
- List item 1
|
||||||
|
- List item 2
|
||||||
|
- List item 3
|
||||||
|
|
||||||
|
**Bold text** and *italic text* should render properly.
|
||||||
|
|
||||||
|
[Link to main site](https://projects.ansonbiggs.com)
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
If you can see clean, minimal styling without navigation, the ghost profile is working correctly.
|
71
validate-ghost-extraction.sh
Executable file
71
validate-ghost-extraction.sh
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Simple validation script for ghost content extraction
|
||||||
|
echo "🔍 Validating ghost profile implementation..."
|
||||||
|
|
||||||
|
# Check if required files exist
|
||||||
|
echo "📁 Checking required files..."
|
||||||
|
if [ ! -f "_quarto.yml" ]; then
|
||||||
|
echo "❌ _quarto.yml not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "ghost-iframe.css" ]; then
|
||||||
|
echo "❌ ghost-iframe.css not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "ghost-upload/src/main.rs" ]; then
|
||||||
|
echo "❌ Rust source not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ All required files present"
|
||||||
|
|
||||||
|
# Check if ghost profile is defined in _quarto.yml
|
||||||
|
echo "📋 Checking ghost profile configuration..."
|
||||||
|
if grep -q "ghost:" _quarto.yml; then
|
||||||
|
echo "✅ Ghost profile found in _quarto.yml"
|
||||||
|
else
|
||||||
|
echo "❌ Ghost profile not found in _quarto.yml"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if GitLab CI builds both versions
|
||||||
|
echo "🔧 Checking GitLab CI configuration..."
|
||||||
|
if grep -q "ghost-content" .gitlab-ci.yml; then
|
||||||
|
echo "✅ GitLab CI configured for dual output"
|
||||||
|
else
|
||||||
|
echo "❌ GitLab CI not configured for ghost-content"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if Rust code has extract_article_content function
|
||||||
|
echo "🦀 Checking Rust implementation..."
|
||||||
|
if grep -q "extract_article_content" ghost-upload/src/main.rs; then
|
||||||
|
echo "✅ Content extraction function found"
|
||||||
|
else
|
||||||
|
echo "❌ Content extraction function not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify Rust code compiles
|
||||||
|
echo "🛠️ Building Rust code..."
|
||||||
|
cd ghost-upload
|
||||||
|
if cargo check --quiet; then
|
||||||
|
echo "✅ Rust code compiles successfully"
|
||||||
|
else
|
||||||
|
echo "❌ Rust compilation failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo ""
|
||||||
|
echo "🎉 All validations passed!"
|
||||||
|
echo "📋 Summary of changes:"
|
||||||
|
echo " • Quarto profiles for dual-output rendering"
|
||||||
|
echo " • Ghost-optimized CSS styling"
|
||||||
|
echo " • GitLab CI builds both main site and ghost-content"
|
||||||
|
echo " • Rust extracts HTML content instead of using iframes"
|
||||||
|
echo ""
|
||||||
|
echo "🚀 Ready for testing in CI/CD pipeline!"
|
Reference in New Issue
Block a user