# File Structure

## **File Structure**

After unzipping the theme, you will find a structure like this:

<FileTree>

- themes/
  - upstart/ (📌 Main theme folder)
- changelog.html (🔗 Links to online changelog)
- documentation.html (🔗 Links to online documentation)

</FileTree>

In the Tina edition, the main theme folder is `upstart-tina`. In the Sanity edition, it is `upstart-sanity`.

---

### **Main Theme Directory Structure**
This is the Astro edition. The Tina and Sanity editions have the same layout, with the differences listed below.

<FileTree>

- upstart/
  - .cursor/
    - rules/
      - theme-architecture.mdc (AI: Cursor)
  - .github/
    - copilot-instructions.md (AI: GitHub Copilot)
  - .windsurf/
    - rules/
      - theme-architecture.md (AI: Windsurf)
  - AGENTS.md (AI: the main instructions)
  - CLAUDE.md (AI: Claude Code)
  - GEMINI.md (AI: Gemini CLI)
  - SKILLS.md (AI: step-by-step recipes)
  - CHANGELOG.md
  - README.md
  - astro.config.mjs
  - netlify.toml
  - package.json
  - package-lock.json
  - vercel.json
  - vercel.sh
  - wrangler.toml
  - ... (editor, formatter, and test settings)
  - public/
    - .htaccess
    - \_headers
    - images/
      - favicons/
      - og-image.jpg
    - plyr/
    - umami.is.js
    - videos/
  - scripts/
    - generate-favicons.mjs
    - generate-multilingual-content.mjs
    - remove-draft-from-sitemap.mjs
    - remove-multilingual.mjs
    - toml-watcher.mjs
  - src/
    - \_\_tests\_\_/ (Unit tests)
    - assets/
      - fonts/
      - images/
    - config/ (Site-wide settings)
      - config.toml (Global config)
      - fonts.json (Font definitions)
      - language.json (Language settings)
      - menu.ar.json (Arabic menu)
      - menu.en.json (English menu)
      - menu.fr.json (French menu)
      - social.json (Social links)
    - content/ (Content, with a folder per language in each)
      - author/ (Blog authors)
        - arabic/
        - english/
        - french/
      - blog/ (Blog posts and the blog page)
      - changelog/ (Changelog page)
      - contact/ (Contact page)
      - faq/ (FAQ questions and answers)
      - homepage/ (Homepage)
      - integration/ (Integrations and the listing page)
        - images/ (Gallery images)
      - pages/ (Elements page, privacy policy, terms)
      - pricing/ (Pricing page)
      - sections/ (The content of each section)
      - \_file_format.md (Frontmatter docs)
    - i18n/ (Interface labels)
      - ar.json (Arabic)
      - en.json (English)
      - fr.json (French)
    - layouts/ (Page layouts & UI components)
      - Base.astro
      - components/ (Reusable UI elements)
        - IntegrationSingle.astro
        - SinglePageLayout.astro
        - buttons/
        - cards/
        - global/
          - Footer.astro
          - Head.astro
          - Logo.astro
          - footer/
            - FooterAi.astro
            - FooterCredit.astro
          - header/
            - Header.astro
            - Navbar.astro
            - MenuItem.astro
            - NavStage.astro
            - ... (other menu components)
        - sections/
        - seo/
        - social/
        - utilities/
        - widgets/
      - helpers/
      - shortcodes/ (Custom MDX components)
    - lib/ (Shared utilities)
    - pages/ (Dynamic & static pages)
      - [...lang]/ (Multi-language support)
        - index.astro (Homepage)
        - features.astro
        - pricing.astro
        - faq.astro
        - changelog.astro
        - contact.astro
        - [page].astro (Other pages: elements, privacy, terms)
        - 404.astro
        - blog/ (Blog list, single & pagination)
        - integration/ (Integration list & single)
        - llms.txt.ts
        - llms-full.txt.ts
      - [...path].md.ts (Markdown copies)
      - 404.astro
      - robots.txt.ts (Robots.txt generator)
    - plugins/
      - odometer/ (Number animations)
      - ... (other small scripts)
    - styles/
      - animation.css
      - base.css
      - buttons.css
      - components.css
      - globals.css
      - navigation.css
      - rtl.css
      - safe.css
      - theme.css
      - utilities.css
    - types/ (TypeScript definitions)
    - content.config.ts (Content settings)
    - env.d.ts (Env variable types)

</FileTree>

---

#### What Differs By Edition

| Path                                                                                                       | Astro | Tina | Sanity |
| ---------------------------------------------------------------------------------------------------------- | ----- | ---- | ------ |
| `src/content/`, `src/i18n/`, `src/config/menu.<lang>.json`                                                 | Yes   | Yes  | No. These are documents in your Sanity project |
| `.env.example`                                                                                             | No    | Yes  | Yes    |
| `tina/`, `scripts/tina/`, `scripts/cms/`, `public/admin/`, `src/layouts/components/tina/`, `src/lib/tina/` | No    | Yes  | No     |
| `sanity/`, `sanity.config.ts`, `sanity.cli.ts`, `scripts/sanity/`, `scripts/dev.mjs`, `src/lib/sanity/`, `src/sanity-routes/`, `src/middleware.ts` | No | No | Yes |

In the Sanity edition, the demo content is in `sanity/seed/demo-content.json`, and the integration gallery images are in `src/assets/images/integration/gallery/`. In the Tina edition, the blog and integration listing pages and the privacy policy and terms are `.mdx` files, not `.md`.

#### Key Directories & Their Purpose

##### `/public` ⟶ Static Assets

- Stores favicons, videos, and other files served as they are.
- Files inside this folder are accessible via direct URLs (e.g., `/images/og-image.jpg`).

##### `/src` ⟶ Main Codebase

- Contains all Astro components, pages, content, and styles.
- Theme images are in `src/assets/images/`. A path such as `/images/logo.svg` points to that folder.
- To add a post, an integration, or a page, add a file to the language folder of `src/content/blog/`, `integration/`, or `pages/`. A new entry with only a title won't break the site, and it builds. Its card or page shows what you filled in, and images and other fields stay empty until you add them, so fill them in before you publish.

##### `/scripts` ⟶ Automation Scripts

- Optimizes workflows with utilities like:
  - `generate-favicons.mjs` → Generates favicons for all devices.
  - `generate-multilingual-content.mjs` → Adds a language.
  - `remove-draft-from-sitemap.mjs` → Removes pages with `draft: true` or `excludeFromSitemap: true` from the sitemap.
  - `remove-multilingual.mjs` → Removes every language except your default one.
  - `toml-watcher.mjs` → Generates the settings file the theme reads from `config.toml`, and watches it during `npm run dev`.

---

#### ⚙️ Key Configuration Files

##### `astro.config.mjs` - Astro Configuration

- Manages integrations, build settings, and markdown processing.
- For general site settings, modify `config.toml` instead.

##### `config.toml` - Global Settings

- Primary configuration file for theme settings, in `src/config/`. Most settings have a comment.
- In the Tina edition, it is **Site settings** at `/admin/`. In the Sanity edition, **Site settings** in the Studio wins over the same value in this file, and the favicon, language settings, and blog and integration folder names stay here.

| Section                             | What it controls                                                          |
| ----------------------------------- | ------------------------------------------------------------------------- |
| `[site]`, `[site.favicon]`          | Title, description, tagline, `baseUrl`, logo, trailing slash, and favicon |
| `[seo]`                             | `author`, `keywords`, and `robots`                                        |
| `[seo.robotsTxt]`                   | `robots.txt`, including the `aiSearch` and `aiTraining` crawler switches  |
| `[seo.ai]`                          | `llms.txt`, `llms-full.txt`, and the Markdown copies of your pages        |
| `[seo.sitemap]`                     | The sitemap                                                               |
| `[settings]`                        | `blogFolder`, `integrationFolder`, `pagination`, `stickyHeader`, `contactFormAction`, `contactFormProvider`, and `footerDescription` |
| `[settings.themeCredit]`            | The theme credit in the footer and in `llms.txt`                          |
| `[settings.copyright]`              | The footer copyright line                                                 |
| `[settings.smoothScroll]`           | Smooth scrolling. See [Smooth Scroll](../../features/smooth-scroll/)      |
| `[settings.pageActions]`            | The Ask AI links. See [AI Links & llms](../../features/ai-links-llms/)    |
| `[settings.subscription]`           | The Mailchimp subscribe form in the footer                                |
| `[settings.multilingual]`           | `enable`, `defaultLanguage`, `disableLanguages`, and `showDefaultLangInUrl` |
| `[settings.contactInfo]`            | The phone, email, and address listed in `llms.txt`. The phone also shows in a mega menu's bottom row |
| `[settings.navigationButton]`       | The button in the header                                                  |
| `[settings.markup.tableOfContents]` | The table of contents on blog posts                                       |
| `[opengraph]`                       | `image`, `ogLocale`, `ogType`, `twitter`, and `twitterCard`               |
| `[head]`                            | Scripts, stylesheets, and tags to add to the `<head>` of every page       |

##### Styling & Fonts

- **Colors and typography** live in `src/styles/theme.css`.
- **Fonts** are defined in `src/config/fonts.json` and loaded automatically.

##### AI Instruction Files

These tell coding assistants about the theme's structure and rules:

| File                                    | Read by                               |
| --------------------------------------- | ------------------------------------- |
| `AGENTS.md`                             | OpenAI Codex, and all the tools below |
| `CLAUDE.md`                             | Claude Code. It imports `AGENTS.md`   |
| `GEMINI.md`                             | Gemini CLI. It imports `AGENTS.md`    |
| `.cursor/rules/theme-architecture.mdc`  | Cursor                                |
| `.windsurf/rules/theme-architecture.md` | Windsurf                              |
| `.github/copilot-instructions.md`       | GitHub Copilot                        |
| `SKILLS.md`                             | Step-by-step recipes for common jobs  |

#### Other Important Files

- **`package.json`** → Manages dependencies & npm scripts (`npm run dev`).
- **`wrangler.toml` / `netlify.toml` / `vercel.json`** → Deployment configuration for Cloudflare Pages, Netlify, and Vercel.

<br />

Now that you understand the project structure, it's time to customize the site's identity and logo.