Customization
Customize the look and feel of your documentation site
JuicyDocs is built with Tailwind CSS v4, making it easy to customize the design to match your brand.
Styling with Tailwind
Theme Configuration
The main theme configuration is in src/assets/css/main.css:
@theme {
/* Font families */
--font-sans: "General Sans", system-ui, sans-serif;
--font-mono: "Fira Code", monospace;
/* Custom breakpoints */
--breakpoint-xs: 24.375rem; /* 390px */
/* Max widths */
--max-width-8xl: 90rem; /* 1440px */
--max-width-9xl: 105rem; /* 1680px */
}CSS Files
Styles are organized into modular files in src/assets/css/:
| File | Purpose |
|---|---|
main.css | Main entry point, theme config |
_base.css | Base styles, fonts, resets |
_typography.css | Prose/content typography |
_buttons.css | Button components |
_navigation.css | Sidebar, TOC, search styles |
_code.css | Code block styles |
_utilities.css | Utility classes |
Changing Colors
JuicyDocs uses Tailwind's color palette. The primary accent colors are:
- Light mode: Red (
red-500,red-600, etc.) - Dark mode: Amber (
amber-400,amber-500, etc.)
To change the accent color, search and replace in the CSS files:
/* Example: Change from red to blue */
/* Before */
@apply text-red-600 dark:text-amber-400;
/* After */
@apply text-blue-600 dark:text-blue-400;Layouts
JuicyDocs includes several layouts in src/_includes/layouts/:
| Layout | Purpose |
|---|---|
base.njk | Base HTML structure, head, scripts |
docs.njk | Documentation pages with sidebar and TOC |
page.njk | Simple pages without TOC |
changelog.njk | Changelog/blog entries |
Creating a Custom Layout
- Create a new file in
src/_includes/layouts/ - Extend the base layout:
---
layout: layouts/base.njk
---
<main class="container mx-auto px-4 py-8">
</main>- Use in your content:
---
layout: layouts/custom.njk
title: My Page
---Shortcodes
JuicyDocs includes custom shortcodes defined in config/shortcodes.js.
Phosphor Icons
Use Phosphor icons anywhere in your templates:
<svg height="24" width="24" aria-hidden="true" class="phicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" /></svg><svg height="20" width="20" aria-hidden="true" class="phicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z" /></svg>```
Available weights: `thin`, `light`, `regular`, `bold`, `fill`, `duotone`
Browse icons at [phosphoricons.com](https://phosphoricons.com/)
## Adding Custom JavaScript
Add custom JavaScript in `src/assets/js/`. The main entry point is `main.js`.
For page-specific scripts, add them in your layout or use Eleventy's JavaScript template engine. 