Skip to content

Settings

Celestial can be customized through a .celestial/settings.json file in your workspace root. This file allows you to configure the editor’s appearance, AI assistant, and asset handling.

Create a .celestial/settings.json file in your workspace root:

your-project/
├── .celestial/
│ └── settings.json
├── docs/
└── other-files/

Then tell Celestial to open that directory and your settings.json file will be automatically loaded.

./celestial/settings.json
{
"appearance": {
"template": "path/to/template.html",
"theme": "path/to/theme.css"
},
"assets": {
"previewBaseUrl": "http://localhost:4321"
},
"llm": {
"provider": "ollama",
"model": "llama2"
}
}

Provide a custom HTML template to wrap your editor content, perfect for matching your blog or documentation site’s styling. See Astro integration for use with an Astro blog.

{
"appearance": {
"template": "templates/editor.html"
}
}

Custom HTML templates are primarily intended to match your editor content to a blog/website. Separately, you may wish to just apply a “theme” to Celestial — e.g. tweak colors, fonts etc. Celestial supports this via the theme property:

{
"appearance": {
"theme": "themes/dark.css"
}
}

Celestial’s default theme.css:

@layer celestialUI {
:root {
--shadow-body-height: 95vh;
--shadow-body-width: 100%;
--shadow-body-overflow-y: auto;
/* Fonts */
--base-font-size: 16px;
--xs-text: 0.5rem; /* 8px */
--sm-text: 0.75rem; /* 12px */
--xlsm-text: 0.875rem; /* 14px */
--md-text: 1rem; /* 16px */
--lg-text: 1.5rem; /* 24px */
--xl-text: 2rem; /* 32px */
--2xl-text: 3rem; /* 48px */
--font-family: system-ui, sans-serif;
--font-family-header: var(--font-family);
--font-family-mono: var(--font-family);
/* Spacing */
--xxs-space: 0.25rem; /* 4px */
--xs-space: 0.5rem; /* 8px */
--sm-space: 0.75rem; /* 12px */
--md-space: 1rem; /* 16px */
--lg-space: 1.5rem; /* 24px */
--xl-space: 2rem; /* 32px */
--2xl-space: 3rem; /* 48px */
/* Icons */
--xs-icon: 8px;
--sm-icon: 16px;
--md-icon: 24px;
--lg-icon: 32px;
/* Colors */
--surface-color: oklch(27.4% 0.006 286.033);
--surface-color-secondary: oklch(25% 0.006 286.033);
--surface-color-secondary-hover: oklch(35% 0.006 286.033);
--on-surface-color-secondary-hover: oklch(40% 0.006 286.033);
--background: rgb(20, 20, 20);
--background-secondary: rgb(25, 25, 25);
--primary-color: oklch(0.65 0.27 250); /* Cosmic purple */
--primary-color-light: oklch(0.75 0.2 250); /* Lighter purple */
--primary-color-dark: oklch(0.55 0.27 250); /* Darker purple */
--on-primary-color: oklch(0.98 0.005 0); /* White text on primary */
--accent-color: oklch(0.7 0.2 200); /* Nebula teal */
--accent-color-light: oklch(0.8 0.15 200); /* Lighter teal */
--accent-color-dark: oklch(0.6 0.2 200); /* Darker teal */
--on-accent-color: oklch(0.1 0.02 270); /* Dark text on accent */
/* Alert/status colors */
--success-color: oklch(0.65 0.2 150); /* Green nebula */
--warning-color: oklch(0.7 0.2 80); /* Solar flare orange */
--error-color: oklch(0.65 0.25 30); /* Red giant */
--info-color: oklch(0.7 0.2 230); /* Blue star */
--border-color: rgb(40, 40, 40);
--divider-color: rgb(70, 70, 70);
--on-surface-color: oklch(0.8607 0 0);
--on-surface-color-muted: oklch(0.7692 0.0145 248.02);
--on-surface-color-disabled: oklch(
from var(--on-surface-color-muted) l c h / 0.5
);
--lg-shadow: 0px 3px 5px rgba(0, 0, 0, 0.15);
--md-shadow: 0px 2px 3px 3px rgba(0, 0, 0, 0.3);
--sm-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
/* Layout */
--container-width: 720px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-family-header);
font-weight: 600;
}
h1 {
font-size: var(--2xl-text);
margin: var(--xl-space) 0 0;
}
h2 {
font-size: var(--xl-text);
line-height: 1.25;
margin: var(--lg-space) 0;
}
h3 {
font-size: var(--lg-text);
line-height: 1.33;
margin: var(--lg-space) 0;
}
h4 {
font-size: var(--md-text);
}
h5 {
font-size: var(--md-text);
}
h6 {
font-size: var(--md-text);
}
hr {
margin: var(--md-space) 0;
}
p {
margin: var(--md-space) 0;
padding: 0;
font-size: var(--md-text);
line-height: 1.5;
font-weight: 400;
font-family: var(--font-family);
}
ul,
ol {
margin: var(--md-space) 0 var(--md-space) var(--lg-space);
padding: 0;
font-family: var(--font-family);
}
li {
margin: var(--xs-space) 0;
padding: 0;
p {
margin: 0;
}
}
a {
color: var(--primary-color);
}
code {
background: var(--surface-color);
padding: 2px var(--xs-space);
border-radius: var(--xs-space);
font-family: var(--font-family-mono);
}
.editor {
outline: none;
border: none;
padding: var(--lg-space);
margin: 0 auto;
position: relative;
max-width: var(--container-width);
p.empty {
position: relative;
&::after {
content: "Enter text";
display: inline-block;
pointer-events: none;
font-style: italic;
color: var(--on-surface-color-muted);
position: absolute;
left: 0px;
top: 0px;
}
}
}
}

Configure how assets (images, etc.) are handled:

{
"assets": {
"previewBaseUrl": "http://localhost:4321"
}
}

The previewBaseUrl setting helps preview images and other assets correctly during development without modifying the actual file paths in your documents.

Use cases:

  • Local development servers
  • Testing with different CDN configurations
  • Previewing assets from a staging environment

Example:

![My Image](./images/screenshot.png)

With previewBaseUrl: "http://localhost:4321", the image will preview as: http://localhost:4321/images/screenshot.png

But when saved, the file will still contain the original relative path: ./images/screenshot.png

Configure your AI writing assistant powered by Ollama:

{
"llm": {
"provider": "ollama",
"model": "llama2"
}
}

See ai docs for more details.