This guide covers all configuration options for single-language shipyard sites.
The key difference from multi-language sites is the absence of i18n configuration:
// astro.config.mjs
export default defineConfig({
// ✅ Single-language: No i18n section needed
integrations: [
shipyard({
title: 'My Site',
tagline: 'My awesome site',
brand: 'My Brand',
}),
],
})
Compare with multi-language configuration:
// Multi-language sites need this:
export default defineConfig({
i18n: {
defaultLocale: 'en',
locales: ['en', 'de'],
// ... more i18n config
},
// ...
})
shipyard({
// Site identity
title: 'Your Site Name', // Page titles and meta
tagline: 'Your site description', // Homepage tagline
brand: 'Your Brand', // Navbar brand text
// Navigation menu
navigation: {
docs: {
label: 'Documentation',
href: '/docs',
},
blog: {
label: 'Blog',
href: '/blog',
},
about: {
label: 'About',
href: '/about',
},
},
// External scripts (optional)
scripts: [
'https://example.com/script.js',
{
src: 'https://example.com/async-script.js',
async: true,
},
],
})
shipyardBlog(['blog'], {
// Optional blog settings
postsPerPage: 10, // Pagination
showAuthor: true, // Show post authors
showDate: true, // Show publication dates
showTags: true, // Show tag lists
})
shipyardDocs(['docs'], {
// Optional docs settings
sidebar: true, // Show sidebar navigation
breadcrumbs: true, // Show breadcrumb navigation
editLinks: true, // Show "edit this page" links
})
Configure your content in src/content.config.ts:
import { defineCollection } from 'astro:content'
import { docsSchema, blogSchema } from '@levino/shipyard-docs'
import { glob } from 'astro/loaders'
// Blog collection
const blog = defineCollection({
schema: blogSchema,
loader: glob({
pattern: '**/*.md',
base: './blog' // No language subdirectories!
}),
})
// Docs collection
const docs = defineCollection({
schema: docsSchema,
loader: glob({
pattern: '**/*.md',
base: './docs' // No language subdirectories!
}),
})
export const collections = { blog, docs }
// astro.config.mjs
integrations: [
tailwind({
applyBaseStyles: false, // Let shipyard handle base styles
config: {
// Custom Tailwind config
theme: {
extend: {
colors: {
primary: '#your-color',
},
},
},
},
}),
]
shipyard uses DaisyUI for components. Configure themes in tailwind.config.js:
module.exports = {
plugins: [require('daisyui')],
daisyui: {
themes: [
'light',
'dark',
'cupcake',
// ... or create custom themes
],
},
}
Single-language sites use clean URLs:
| Content Type | Single-Language | Multi-Language |
|---|---|---|
| Homepage | / | /en/, /de/ |
| Blog index | /blog | /en/blog, /de/blog |
| Blog post | /blog/post-slug | /en/blog/post-slug |
| Docs page | /docs/page-slug | /en/docs/page-slug |
| About page | /about | /en/about, /de/about |
Set environment-specific configuration:
# .env
PUBLIC_SITE_URL=https://mysite.com
PUBLIC_ANALYTICS_ID=GA_MEASUREMENT_ID
Access in configuration:
export default defineConfig({
site: import.meta.env.PUBLIC_SITE_URL,
integrations: [
shipyard({
title: 'My Site',
// Use env vars for dynamic config
}),
],
})
If you later need internationalization:
astro.config.mjsblog/en/post.md
blog/de/post.md
docs/en/page.md
docs/de/page.md
The framework will handle the rest automatically!
Override built-in components:
shipyard({
components: {
Header: './src/components/CustomHeader.astro',
Footer: './src/components/CustomFooter.astro',
},
})
export default defineConfig({
build: {
inlineStylesheets: 'always', // Inline small CSS
split: true, // Code splitting
},
vite: {
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ['astro', 'react', 'vue'],
},
},
},
},
},
})
That covers the essential configuration options! For more advanced use cases, check the official Astro and shipyard documentation.