Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions scripts/test-local-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

# Test local statue-ssg package with agent-blank template
# Usage: ./scripts/test-local-template.sh

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
TEST_DIR="$PROJECT_ROOT/build/test-preview-template"
TARBALL_NAME="statue-ssg-local.tgz"

echo "🗿 Testing local statue-ssg package with agent-blank template..."

# 1. Create tarball from current project
echo "📦 Creating tarball..."
cd "$PROJECT_ROOT"
npm pack --pack-destination "$PROJECT_ROOT"
TARBALL=$(ls -t statue-ssg-*.tgz | head -1)
mv "$TARBALL" "$TARBALL_NAME"
echo "✓ Created $TARBALL_NAME"

# 2. Remove old test directory if exists
if [ -d "$TEST_DIR" ]; then
echo "🗑️ Removing old test directory..."
rm -rf "$TEST_DIR"
fi

# 3. Create fresh test directory
echo "📁 Creating test directory..."
mkdir -p "$TEST_DIR"

# 4. Move tarball to test directory
mv "$TARBALL_NAME" "$TEST_DIR/"

# 5. Setup new SvelteKit project and install local package
echo "🚀 Setting up new SvelteKit project..."
cd "$TEST_DIR"
yes | npx sv create . --template minimal --types ts --no-add-ons --install npm

echo "📥 Installing local statue-ssg..."
npm install "./$TARBALL_NAME"

echo "⚙️ Running statue init with agent-blank template..."
npx statue init --template agent-blank

echo "📥 Installing dependencies..."
npm install

# 6. Clean up tarball
echo "🗑️ Cleaning up tarball..."
rm -f "$TARBALL_NAME"

echo ""
echo "✨ Setup complete!"
echo "📍 Test project location: $TEST_DIR"
echo ""
echo "🏃 Starting dev server..."
npm run build && npm run preview
94 changes: 94 additions & 0 deletions templates/agent-blank/content/blog/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Hello World
date: 2025-11-21
author: Statue User
description: Your first blog post
---

# Hello World

Welcome to your first blog post!

The page contents can be changed by modifying the markdown file located at content/blog/hello-world.md that Statue builds into the HTML displayed on your site.

## Adding New Content

To create new Statue blog entries, simply add new markdown fikes to content/blog/ and rebuild!

```bash
echo -e "---\ntitle: Second Post\ndate: 2025-11-21\nauthor: Statue User\ndescription: My Second Post\n---\n\n# Hello Again\n\nHello from the other side" > content/blog/second-post.md
# Or, try creating and editing content/blog/second-post.md in a text editor
# Or use an IDE like brilliant.mplode.dev
# To view the new content, stop any active local Statue server with ctl+C, then run
npm run build && npm run dev
```

To modify the styling or format for all content/ entries, you can edit the formatting at src/routes/\[...slug\]/+page.svelte

```bash
vim src/routes/\[...slug\]/+page.svelte
# If npm run dev is running, it should automatically update the site.
# Otherwise, run
npm run dev
```

For more fine-grained configuration, check out [SvelteKit's Docs](https://svelte.dev/docs/kit/routing) to build whatever custom functionality your heart desires!

## Markdown Features

Markdown is a lightweight markup language that allows you to write using an easy-to-read, easy-to-write plain text format, which then converts to valid HTML for viewing on a website.

### Some examples:

Markdown supports most basic text formatting:

- **Bold text** is created using double asterisks
- *Italic text* is created using single asterisks
- [Links](https://accretional.com) are created using square brackets and parentheses

```markdown
This is **bold** text.
This is *italicized* text.
Here's a [link to Statue's Github](https://github.com/accretional/statue)
```
This is **bold** text.

This is *italicized* text.

Here's a [link to Statue's Github](https://github.com/accretional/statue)

### Code blocks

Code blocks are useful when you need to disable markdown formatting for a piece of text.

````markdown
This is how you wrap some markdown in a code block
```markdown
My code block text
```
````

Or, sometimes you just want to format something like code.

```javascript
// This is a code block
function helloWorld() {
console.log("Hello, world!");
}
```

### Headers

You can separate out different sections of your markdown text with headers, like

```markdown
### Headers

This is my text under the Headers section.
````

## Next Steps

Check out the rest of your Statue site to continue customizing it!

More detailed customization instructions can be found under your sites docs.
78 changes: 78 additions & 0 deletions templates/agent-blank/site.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Site Configuration
// This file contains your site's general settings
// You can manage email addresses, social media links, and other contact information from here

export const siteConfig = {
// Site general information
site: {
name: "Statue SSG",
description: "A simple static site generator for markdown content with SvelteKit",
url: "https://statuessg.com",
author: "Statue Team"
},

// Contact information
contact: {
// Main contact email
email: "[email protected]",

// Privacy policy related email
privacyEmail: "[email protected]",

// Support email
supportEmail: "[email protected]",

// Phone number (optional)
phone: "+1 (555) 123-4567",

// Mailing address
address: {
street: "123 Statue Street",
city: "San Francisco",
state: "CA",
zipCode: "94103",
country: "United States"
}
},

// Social media links
social: {
twitter: "https://twitter.com/statuessg",
github: "https://github.com/accretional/statue",
linkedin: "https://linkedin.com/company/statuessg",
facebook: "https://facebook.com/statuessg",
instagram: "https://instagram.com/statuessg",
youtube: "https://youtube.com/@statuessg"
},

// Legal pages specific settings
legal: {
// Privacy policy last updated date
privacyPolicyLastUpdated: "2024-01-15",

// Terms of use last updated date
termsLastUpdated: "2024-01-15",

// CCPA/CPRA compliance for California state
isCaliforniaCompliant: true,

// Do Not Sell page additional information
doNotSell: {
processingTime: "15 business days",
confirmationRequired: true
}
},

// SEO and meta information
seo: {
defaultTitle: "Statue SSG - Static Site Generator",
titleTemplate: "%s | Statue SSG",
defaultDescription: "A simple static site generator for markdown content with SvelteKit",
keywords: ["static site generator", "markdown", "sveltekit", "ssg"],
ogImage: "/images/og-image.png",
twitterCard: "summary_large_image"
}
};

// Export configuration
export default siteConfig;
24 changes: 24 additions & 0 deletions templates/agent-blank/src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script>
// AI AGENT: NAVIGATION BAR COMPONENT
// Customize logo, colors, and add more links as needed

export let directories = [];
export let activePath = '/';
</script>

<nav class="navbar-box">
<a href="/" class="text-xl font-bold text-primary no-underline hover:text-white">
<span class="text-muted font-normal">Statue/</span>Scaffold
</a>
<div class="flex gap-6">
{#each directories as dir}
<a
href={dir.url}
class="text-secondary no-underline font-medium transition-colors hover:text-primary"
class:text-primary={activePath === dir.url || activePath.startsWith(dir.url + '/')}
>
{dir.title}
</a>
{/each}
</div>
</nav>
94 changes: 94 additions & 0 deletions templates/agent-blank/src/lib/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@import "tailwindcss";

/* Tailwind v4 content config */
@source "../";
@source "../../node_modules/statue-ssg/src/**/*.{svelte,js,ts}";

/*
* =============================================================================
* AI AGENT: BLANK TEMPLATE THEME
* =============================================================================
* Simple, minimal theme inspired by early web design.
* Feel free to modify, replace, or remove any of these styles.
*
* You can:
* - Change colors in @theme section
* - Remove the border styles (.placeholder-box, .navbar-box)
* - Replace with your own design system
* - Use standard Tailwind classes instead
* =============================================================================
*/

@theme {
/* AI AGENT: Change these colors to match your design */
--color-bg: #ffffff;
--color-bg-secondary: #f5f5f5;

/* AI AGENT: Text colors */
--color-text-primary: #000000;
--color-text-secondary: #333333;
--color-text-muted: #666666;

/* AI AGENT: Border/line colors */
--color-line: #000000;
--color-line-light: #cccccc;
}

:root {
color-scheme: light;
}

/* AI AGENT: Base styles - modify or replace as needed */
body {
background-color: var(--color-bg);
color: var(--color-text-primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
margin: 0;
padding: 0;
}

* {
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

@layer utilities {
/* AI AGENT: Custom color utilities */
.bg-page { background-color: var(--color-bg); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.border-line { border-color: var(--color-line); }

/*
* AI AGENT: Placeholder styles below are for the wireframe look.
* You can safely remove .placeholder-box and .navbar-box classes
* and replace with your own design.
*/

.placeholder-box {
border: 2px dashed var(--color-line);
border-radius: 4px;
padding: 1rem;
margin: 1rem 0;
background: transparent;
}

.navbar-box {
border: 2px dashed var(--color-line);
border-radius: 4px;
padding: 0.5rem 1rem;
margin-bottom: 1rem;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: transparent;
}
}
1 change: 1 addition & 0 deletions templates/agent-blank/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
3 changes: 3 additions & 0 deletions templates/agent-blank/src/routes/+layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const prerender = true;
export const ssr = true;
export const trailingSlash = 'always';
29 changes: 29 additions & 0 deletions templates/agent-blank/src/routes/+layout.server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { getContentDirectories, getContentByDirectory } from 'statue-ssg/cms/content-processor';

/** @type {import('./$types').LayoutServerLoad} */
export function load() {
// Get content directories
const directories = getContentDirectories();

// Enhance directories with subpages data for consistent footer
const enhancedDirectories = directories.map(directory => {
// Get content from this directory
const directoryContent = getContentByDirectory(directory.name);

// Extract pages as subpages
const subpages = directoryContent.map((content) => ({
title: content.metadata.title,
url: content.url
}));

// Return enhanced directory object
return {
...directory,
subpages
};
});

return {
globalDirectories: enhancedDirectories
};
}
Loading
Loading