Skip to content
New: Customize your theme with an AI assistant. Read the guide

File Structure

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

  • Directorythemes/
    • Directoryfolex/ (📌 Main theme folder, the one with package.json)
      • …
  • changelog.html (🔗 Links to online changelog)
  • documentation.html (🔗 Links to online documentation)

Main Theme Directory Structure

This is the Astro edition. What differs in the Tina and Sanity editions is listed after the tree.

  • Directoryfolex/
    • Directory.cursor/
      • Directoryrules/
        • theme-architecture.mdc (Rules for Cursor)
    • Directory.github/
      • copilot-instructions.md (Rules for GitHub Copilot)
    • Directory.vscode/ (Recommended extensions and settings)
      • …
    • Directory.windsurf/
      • Directoryrules/
        • theme-architecture.md (Rules for Windsurf)
    • Directorypublic/
      • .htaccess (Headers for Apache)
      • _headers (Headers for Netlify and Cloudflare Pages)
      • Directoryimages/ (Favicons and gallery images)
        • …
      • Directoryplyr/ (Video player files)
        • …
      • Directoryvideos/
        • …
      • umami.is.js
    • Directoryscripts/ (Favicons, languages, sitemap, config)
      • …
    • Directorysrc/
      • Directory__tests__/ (Unit tests)
        • …
      • Directoryassets/
        • Directoryimages/
          • …
      • Directoryconfig/ (Site-wide settings)
        • config.toml (Global config)
        • fonts.json (Font definitions)
        • language.json (Language settings)
        • menu.en.json (English menu)
        • menu.fr.json (French menu)
        • menu.ar.json (Arabic menu)
        • social.json (Social links)
      • Directorycontent/ (Content collections, one folder per language: english/, french/, arabic/)
        • Directoryabout-us/ (About page content)
          • …
        • Directoryauthor/ (Blog author profiles)
          • …
        • Directoryblog/ (Blog posts)
          • …
        • Directorycontact/ (Contact page content)
          • …
        • Directoryfaq/ (FAQ page content)
          • …
        • Directoryhomepage/ (Homepage variants: digital agency, creative-agency, personal-portfolio, startup-agency)
          • …
        • Directorypages/ (Static pages: privacy-policy, terms-conditions, elements)
          • …
        • Directoryportfolio/ (Portfolio projects)
          • …
        • Directorypricing/ (Pricing page content)
          • …
        • Directorysections/ (Default content of each section)
          • …
        • Directoryservices/ (Services)
          • …
        • Directoryteam/ (Team members)
          • …
        • _file_format.md (Frontmatter reference)
      • Directoryi18n/ (UI string translations)
        • en.json (English)
        • fr.json (French)
        • ar.json (Arabic)
      • Directorylayouts/ (Page layouts & UI components)
        • Directorycomponents/ (Reusable UI elements)
          • Directorycards/
            • …
          • Directoryglobal/
            • Directoryfooter/ (FooterAi.astro, FooterCredit.astro)
              • …
            • Directoryheader/ (Header.astro, Navbar.astro, MegaMenu.astro, NavStage.astro, LanguageSwitcher.astro, and more)
              • …
            • Footer.astro (Footer layout 1)
            • FooterTwo.astro (Footer layout 2)
            • FooterThree.astro (Footer layout 3)
            • Head.astro
            • Logo.astro
          • Directorysections/ (Section components)
            • …
          • Directoryseo/
            • …
          • Directoryutilities/
            • …
          • Directorywidgets/ (contact form, subscription, offcanvas, search, etc.)
            • …
          • SinglePageLayout.astro
        • Directoryhelpers/ (Icons.astro)
          • …
        • Directoryshortcodes/ (Custom MDX components: Accordion, Tabs, Notice, Testimonial, etc.)
          • …
        • Base.astro
      • Directorylib/ (Shared utilities)
        • …
      • Directorypages/ (Dynamic & static pages)
        • Directory[…lang]/ (Multi-language support)
          • index.astro (Digital Agency homepage)
          • creative-agency.astro
          • personal-portfolio.astro
          • startup-agency.astro
          • about.astro
          • contact.astro
          • faq.astro
          • pricing.astro
          • Directoryblog/ (list, creative, single, category, tag, pagination)
            • …
          • Directoryportfolio/ (masonry, gallery, slider, full-width, single)
            • …
          • Directoryservices/ (grid, two-column, accordion, single)
            • …
          • Directoryteam/ (list, single)
            • …
          • [page].astro (Privacy policy, terms, elements, and your own pages)
          • 404.astro (Translated 404 page)
          • llms.txt.ts
          • llms-full.txt.ts
        • […path].md.ts (Markdown copies of pages)
        • 404.astro
        • robots.txt.ts (robots.txt generator)
      • Directoryplugins/
        • Directoryodometer/ (Number animations)
          • …
      • Directorystyles/
        • animation.css
        • base.css
        • buttons.css
        • components.css
        • global.css
        • navigation.css
        • rtl.css
        • safe.css
        • theme.css
        • utilities.css
      • Directorytypes/ (TypeScript definitions)
        • …
      • content.config.ts (Content collection schemas)
      • env.d.ts (Env variable types)
      • sections.schema.ts (Content options of the sections)
    • AGENTS.md (Instructions for AI assistants)
    • CHANGELOG.md
    • CLAUDE.md (Rules for Claude Code)
    • GEMINI.md (Rules for Gemini CLI)
    • README.md
    • SKILLS.md (Recipes for common jobs)
    • astro.config.mjs
    • netlify.toml
    • package.json
    • package-lock.json
    • vercel.json
    • vercel.sh
    • wrangler.toml

Each folder under src/content/ contains an english/, a french/, and an arabic/ subfolder. Add or edit content inside the language folder you want to update.

What Differs By Edition

Tina has everything above, and adds:

  • tina/: the editor’s setup. tina/generated/collections.json holds its forms.
  • scripts/tina/ and scripts/cms/: the commands behind npm run dev, npm run tina:generate, npm run tina:audit, and npm run setup:tina.
  • src/lib/tina/ and src/layouts/components/tina/: the live preview.
  • .env.example, which lists the optional settings.

The listing files of the blog, portfolio, and services (-index), and the privacy policy and terms, are .mdx instead of .md, so the editor can show them.

Sanity has no src/content/, no src/i18n/, and no src/config/menu.*.json, because that content lives in your Sanity project. It adds:

  • sanity.config.ts, sanity.cli.ts, and sanity/: your Studio.
  • sanity/seed/demo-content.json: the bundled demo content.
  • scripts/sanity/: the commands behind npm run setup, npm run dev:all, and the preview server.
  • src/lib/sanity/, src/sanity-routes/, and src/middleware.ts: reading content and showing drafts.
  • .env.example, which explains every variable.

Key Directories & Their Purpose

/public⟶ Static Assets
  • Stores favicons, videos, and other files that must be served as they are.
  • Files inside this folder are accessible via direct URLs (e.g., /images/favicons/favicon.svg).
/src⟶ Main Codebase
  • Contains all Astro components, pages, content, and styles.
  • A new entry in src/content/ 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.
  • Customize layouts, pages, and components here.
/scripts⟶ Automation Scripts
  • Optimizes workflows with utilities like:
    • generate-favicons.mjs → Generates favicons for all devices.
    • generate-multilingual-content.mjs → Adds a language, and scaffolds copies of your content to translate.
    • remove-multilingual.mjs → Removes every language except your default one.
    • remove-draft-from-sitemap.mjs → Removes pages with draft: true or excludeFromSitemap: true from the sitemap.
    • toml-watcher.mjs → Compiles config.toml into a generated JSON config used at build time.

⚙️ 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

The main settings file, src/config/config.toml. Each setting has a comment beside it.

TableKeys
[site]title, description, tagline, taglineSeparator, baseUrl, logo, logoAlternate, logoText, logoWidth, logoHeight, trailingSlash
[site.favicon]path, image
[seo]author, keywords, robots
[seo.robotsTxt]enable, disallow, aiSearch, aiTraining
[seo.ai]llmsTxt, markdownPages
[seo.sitemap]enable, exclude
[settings]blogFolder, servicesFolder, portfolioFolder, pagination, stickyHeader, pageHeaderDefaultImage, contactFormAction, contactFormProvider, footerDescription
[settings.copyright]enable, text
[settings.subscription]enable, title, note, formAction, mailchimpTagValue
[settings.multilingual]enable, defaultLanguage, disableLanguages, showDefaultLangInUrl
[settings.contactInfo]address, email, phone
[settings.headerOffcanvas]enable, logo, description, and [settings.headerOffcanvas.button] with enable, label, url
[settings.smoothScroll]enable, respectReducedMotion, duration, easing, smoothWheel, syncTouch, wheelMultiplier, touchMultiplier, anchors, autoRaf, stopInertiaOnNavigate
[settings.themeCredit]enable, text, url
[settings.pageActions]enable, footer, providers
[settings.navigationButton]enable, label, url
[settings.markup.tableOfContents]enable, expanded, endLevel, ordered, startLevel
[opengraph]image, ogType, twitter, twitterCard
[head]content
Styling & Fonts
  • Colors, breakpoints, and the type scale live in src/styles/theme.css.
  • Fonts are defined in src/config/fonts.json and loaded automatically.

Other Important Files

  • package.json → Manages dependencies & npm scripts (npm run dev).
  • netlify.toml / vercel.json / vercel.sh / wrangler.toml → Deployment settings for Netlify, Vercel, and Cloudflare Pages. See Deployment.

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

Type something to search...