[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 2\ntrim_trailing_whitespace = true\nquote_type = single\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[*.php]\nindent_size = 4\n\n[*.blade.php]\nindent_size = 2\n\n[resources/views/**.php]\nindent_size = 2\n\n[index.php]\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "/.gitattributes export-ignore\n/.github export-ignore\n"
  },
  {
    "path": ".github/labeler.yml",
    "content": "build:\n  - changed-files:\n      - any-glob-to-any-file:\n          - vite.config.js\ndependencies:\n  - changed-files:\n      - any-glob-to-any-file:\n          - package-lock.json\njavascript:\n  - changed-files:\n      - any-glob-to-any-file:\n          - resources/js/**/*.js\nphp:\n  - changed-files:\n      - any-glob-to-any-file:\n          - functions.php\n          - app/**/*.php\n          - resources/views/**/*.php\nviews:\n  - changed-files:\n      - any-glob-to-any-file:\n          - index.php\n          - resources/views/**/*.php\n"
  },
  {
    "path": ".github/renovate.json",
    "content": "{\n  \"baseBranchPatterns\": [\n    \"main\"\n  ],\n  \"commitMessageAction\": \"⬆️ Bump\",\n  \"commitMessageTopic\": \"{{depName}}\",\n  \"extends\": [\n    \"config:recommended\",\n    \"schedule:weekly\"\n  ],\n  \"rangeStrategy\": \"replace\",\n  \"ignoreDeps\": [\"php\"],\n  \"packageRules\": [\n    {\n      \"matchUpdateTypes\": [\"major\"],\n      \"enabled\": false\n    },\n    {\n      \"matchPackageNames\": [\"node\"],\n      \"enabled\": false\n    },\n    {\n      \"matchManagers\": [\"composer\"],\n      \"matchDepTypes\": [\"require\"],\n      \"matchPackageNames\": [\"php\"],\n      \"enabled\": false\n    },\n    {\n      \"matchUpdateTypes\": [\n        \"minor\",\n        \"patch\",\n        \"pin\"\n      ],\n      \"enabled\": true\n    }\n  ],\n  \"timezone\": \"America/Detroit\"\n}\n"
  },
  {
    "path": ".github/workflows/discourse.yml",
    "content": "name: Post release topic on Discourse\n\non:\n  release:\n    types: [published]\n\njobs:\n  post:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: roots/discourse-topic-github-release-action@main\n      with:\n        discourse-api-key: ${{ secrets.DISCOURSE_RELEASES_API_KEY }}\n        discourse-base-url: ${{ secrets.DISCOURSE_BASE_URL }}\n        github-token: ${{ github.token }}\n        discourse-category: 11\n        discourse-tags:\n          releases\n"
  },
  {
    "path": ".github/workflows/labeler.yml",
    "content": "name: \"Pull Request Labeler\"\non:\n- pull_request_target\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/labeler@v5\n      with:\n        repo-token: \"${{ secrets.GITHUB_TOKEN }}\"\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Main\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\n\njobs:\n  node:\n    name: Node ${{ matrix.node }}\n    runs-on: ubuntu-latest\n    if: \"!contains(github.event.head_commit.message, '[ci skip]')\"\n    strategy:\n      matrix:\n        node: ['20']\n\n    steps:\n      - name: Checkout the project\n        uses: actions/checkout@v4\n\n      - name: Setup the Node ${{ matrix.node }} environment on ${{ runner.os }}\n        uses: actions/setup-node@v4\n        with:\n          node-version: ${{ matrix.node }}\n        env:\n          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Install dependencies using npm\n        run: npm install\n\n      - name: Build and compile assets\n        run: |\n          npm run build\n          cat public/build/manifest.json\n\n      - name: Validate theme.json\n        run: |\n          THEME_JSON=\"public/build/assets/theme.json\"\n\n          if [ ! -f \"$THEME_JSON\" ]; then\n            echo \"❌ theme.json not found\"\n            exit 1\n          fi\n\n          jq -e '\n            (.settings.color.palette | length > 0) and\n            (.settings.typography.fontFamilies | length > 0) and\n            (.settings.typography.fontSizes | length > 0)\n          ' \"$THEME_JSON\" 2>&1 || {\n            echo \"❌ Invalid theme.json structure or missing required values\"\n            exit 1\n          }\n\n  php:\n    name: PHP ${{ matrix.php }}\n    runs-on: ubuntu-latest\n    if: \"!contains(github.event.head_commit.message, '[ci skip]')\"\n    strategy:\n      matrix:\n        php: ['8.2']\n\n    steps:\n      - name: Checkout the project\n        uses: actions/checkout@v4\n\n      - name: Setup the PHP ${{ matrix.php }} environment on ${{ runner.os }}\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: ${{ matrix.php }}\n          coverage: xdebug\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Restore the Composer cache directory\n        id: composercache\n        run: echo \"dir=$(composer config cache-files-dir)\" >> $GITHUB_OUTPUT\n\n      - uses: actions/cache@v4\n        with:\n          path: ${{ steps.composercache.outputs.dir }}\n          key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}\n          restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-\n\n      - name: Install Composer dependencies\n        run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest\n\n      - name: Run Pint\n        run: vendor/bin/pint --test\n"
  },
  {
    "path": ".gitignore",
    "content": "/node_modules\n/vendor\n/public/*\n!/public/.gitkeep\n.env\nnpm-debug.log\n"
  },
  {
    "path": "LICENSE.md",
    "content": "Copyright (c) Roots Software LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n  <a href=\"https://roots.io/sage/\"><img alt=\"Sage\" src=\"https://cdn.roots.io/app/uploads/logo-sage.svg\" height=\"100\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://packagist.org/packages/roots/sage\"><img alt=\"Packagist Installs\" src=\"https://img.shields.io/packagist/dt/roots/sage?label=projects%20created&colorB=2b3072&colorA=525ddc&style=flat-square\"></a>\n  <a href=\"https://github.com/roots/sage/actions/workflows/main.yml\"><img alt=\"Build Status\" src=\"https://img.shields.io/github/actions/workflow/status/roots/sage/main.yml?branch=main&logo=github&label=CI&style=flat-square\"></a>\n  <a href=\"https://twitter.com/rootswp\"><img alt=\"Follow Roots\" src=\"https://img.shields.io/badge/follow%20@rootswp-1da1f2?logo=twitter&logoColor=ffffff&message=&style=flat-square\"></a>\n  <a href=\"https://github.com/sponsors/roots\"><img src=\"https://img.shields.io/badge/sponsor%20roots-525ddc?logo=github&style=flat-square&logoColor=ffffff&message=\" alt=\"Sponsor Roots\"></a>\n</p>\n\n# Sage\n\n**Advanced hybrid WordPress starter theme with Laravel Blade and Tailwind CSS**\n\n- 🔧 Clean, efficient theme templating with Laravel Blade\n- ⚡️ Modern front-end development workflow powered by Vite\n- 🎨 Out of the box support for Tailwind CSS\n- 🚀 Harness the power of Laravel with [Acorn integration](https://github.com/roots/acorn)\n- 📦 Block editor support built-in\n\nSage brings proper PHP templating and modern JavaScript tooling to WordPress themes. Write organized, component-based code using Laravel Blade, enjoy instant builds and CSS hot-reloading with Vite, and leverage Laravel's robust feature set through Acorn.\n\n[Read the docs to get started](https://roots.io/sage/docs/installation/)\n\n## Support us\n\nRoots is an independent open source org, supported only by developers like you. Your sponsorship funds [WP Packages](https://wp-packages.org/) and the entire Roots ecosystem, and keeps them independent. Support us by purchasing [Radicle](https://roots.io/radicle/) or [sponsoring us on GitHub](https://github.com/sponsors/roots) — sponsors get access to our private Discord.\n\n### Sponsors\n\n<a href=\"https://carrot.com/\"><img src=\"https://cdn.roots.io/app/uploads/carrot.svg\" alt=\"Carrot\" width=\"120\" height=\"90\"></a> <a href=\"https://wordpress.com/\"><img src=\"https://cdn.roots.io/app/uploads/wordpress.svg\" alt=\"WordPress.com\" width=\"120\" height=\"90\"></a> <a href=\"https://www.itineris.co.uk/\"><img src=\"https://cdn.roots.io/app/uploads/itineris.svg\" alt=\"Itineris\" width=\"120\" height=\"90\"></a> <a href=\"https://kinsta.com/?kaid=OFDHAJIXUDIV\"><img src=\"https://cdn.roots.io/app/uploads/kinsta.svg\" alt=\"Kinsta\" width=\"120\" height=\"90\"></a> <a href=\"https://40q.agency/\"><img src=\"https://cdn.roots.io/app/uploads/40q.svg\" alt=\"40Q\" width=\"120\" height=\"90\"></a>\n\n## Community\n\nKeep track of development and community news.\n\n- Join us on Discord by [sponsoring us on GitHub](https://github.com/sponsors/roots)\n- Join us on [Roots Discourse](https://discourse.roots.io/)\n- Follow [@rootswp on Twitter](https://twitter.com/rootswp)\n- Follow the [Roots Blog](https://roots.io/blog/)\n- Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)\n"
  },
  {
    "path": "app/Providers/ThemeServiceProvider.php",
    "content": "<?php\n\nnamespace App\\Providers;\n\nuse Roots\\Acorn\\Sage\\SageServiceProvider;\n\nclass ThemeServiceProvider extends SageServiceProvider\n{\n    /**\n     * Register any application services.\n     *\n     * @return void\n     */\n    public function register()\n    {\n        parent::register();\n    }\n\n    /**\n     * Bootstrap any application services.\n     *\n     * @return void\n     */\n    public function boot()\n    {\n        parent::boot();\n    }\n}\n"
  },
  {
    "path": "app/View/Composers/App.php",
    "content": "<?php\n\nnamespace App\\View\\Composers;\n\nuse Roots\\Acorn\\View\\Composer;\n\nclass App extends Composer\n{\n    /**\n     * List of views served by this composer.\n     *\n     * @var array\n     */\n    protected static $views = [\n        '*',\n    ];\n\n    /**\n     * Retrieve the site name.\n     */\n    public function siteName(): string\n    {\n        return get_bloginfo('name', 'display');\n    }\n}\n"
  },
  {
    "path": "app/View/Composers/Comments.php",
    "content": "<?php\n\nnamespace App\\View\\Composers;\n\nuse Roots\\Acorn\\View\\Composer;\n\nclass Comments extends Composer\n{\n    /**\n     * List of views served by this composer.\n     *\n     * @var array\n     */\n    protected static $views = [\n        'partials.comments',\n    ];\n\n    /**\n     * The comment title.\n     */\n    public function title(): string\n    {\n        return sprintf(\n            /* translators: %1$s is replaced with the number of comments and %2$s with the post title */\n            _nx('%1$s response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sage'),\n            get_comments_number() === 1 ? _x('One', 'comments title', 'sage') : number_format_i18n(get_comments_number()),\n            get_the_title()\n        );\n    }\n\n    /**\n     * Retrieve the comments.\n     */\n    public function responses(): ?string\n    {\n        if (! have_comments()) {\n            return null;\n        }\n\n        return wp_list_comments([\n            'style' => 'ol',\n            'short_ping' => true,\n            'echo' => false,\n        ]);\n    }\n\n    /**\n     * The previous comments link.\n     */\n    public function previous(): ?string\n    {\n        if (! get_previous_comments_link()) {\n            return null;\n        }\n\n        return get_previous_comments_link(\n            __('&larr; Older comments', 'sage')\n        );\n    }\n\n    /**\n     * The next comments link.\n     */\n    public function next(): ?string\n    {\n        if (! get_next_comments_link()) {\n            return null;\n        }\n\n        return get_next_comments_link(\n            __('Newer comments &rarr;', 'sage')\n        );\n    }\n\n    /**\n     * Determine if the comments are paginated.\n     */\n    public function paginated(): bool\n    {\n        return get_comment_pages_count() > 1 && get_option('page_comments');\n    }\n\n    /**\n     * Determine if the comments are closed.\n     */\n    public function closed(): bool\n    {\n        return ! comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments');\n    }\n}\n"
  },
  {
    "path": "app/View/Composers/Post.php",
    "content": "<?php\n\nnamespace App\\View\\Composers;\n\nuse Roots\\Acorn\\View\\Composer;\n\nclass Post extends Composer\n{\n    /**\n     * List of views served by this composer.\n     *\n     * @var array\n     */\n    protected static $views = [\n        'partials.page-header',\n        'partials.content',\n        'partials.content-*',\n    ];\n\n    /**\n     * Retrieve the post title.\n     */\n    public function title(): string\n    {\n        if ($this->view->name() !== 'partials.page-header') {\n            return get_the_title();\n        }\n\n        if (is_home()) {\n            if ($home = get_option('page_for_posts', true)) {\n                return get_the_title($home);\n            }\n\n            return __('Latest Posts', 'sage');\n        }\n\n        if (is_archive()) {\n            return get_the_archive_title();\n        }\n\n        if (is_search()) {\n            return sprintf(\n                /* translators: %s is replaced with the search query */\n                __('Search Results for %s', 'sage'),\n                get_search_query()\n            );\n        }\n\n        if (is_404()) {\n            return __('Not Found', 'sage');\n        }\n\n        return get_the_title();\n    }\n\n    /**\n     * Retrieve the pagination links.\n     */\n    public function pagination(): string\n    {\n        return wp_link_pages([\n            'echo' => 0,\n            'before' => '<p>'.__('Pages:', 'sage'),\n            'after' => '</p>',\n        ]);\n    }\n}\n"
  },
  {
    "path": "app/filters.php",
    "content": "<?php\n\n/**\n * Theme filters.\n */\n\nnamespace App;\n\n/**\n * Add \"… Continued\" to the excerpt.\n *\n * @return string\n */\nadd_filter('excerpt_more', function () {\n    return sprintf(' &hellip; <a href=\"%s\">%s</a>', get_permalink(), __('Continued', 'sage'));\n});\n"
  },
  {
    "path": "app/setup.php",
    "content": "<?php\n\n/**\n * Theme setup.\n */\n\nnamespace App;\n\nuse Illuminate\\Support\\Facades\\Vite;\n\n/**\n * Inject styles into the block editor.\n *\n * @return array\n */\nadd_filter('block_editor_settings_all', function ($settings) {\n    $style = Vite::asset('resources/css/editor.css');\n\n    $settings['styles'][] = [\n        'css' => \"@import url('{$style}')\",\n    ];\n\n    return $settings;\n});\n\n/**\n * Inject scripts into the block editor.\n *\n * @return void\n */\nadd_action('admin_head', function () {\n    if (! get_current_screen()?->is_block_editor()) {\n        return;\n    }\n\n    if (! Vite::isRunningHot()) {\n        $dependencies = json_decode(Vite::content('editor.deps.json'));\n\n        foreach ($dependencies as $dependency) {\n            if (! wp_script_is($dependency)) {\n                wp_enqueue_script($dependency);\n            }\n        }\n    }\n    echo Vite::withEntryPoints([\n        'resources/js/editor.js',\n    ])->toHtml();\n});\n\n/**\n * Use the generated theme.json file.\n *\n * @return string\n */\nadd_filter('theme_file_path', function ($path, $file) {\n    return $file === 'theme.json'\n        ? public_path('build/assets/theme.json')\n        : $path;\n}, 10, 2);\n\n/**\n * Disable on-demand block asset loading.\n *\n * @link https://core.trac.wordpress.org/ticket/61965\n */\nadd_filter('should_load_separate_core_block_assets', '__return_false');\n\n/**\n * Register the initial theme setup.\n *\n * @return void\n */\nadd_action('after_setup_theme', function () {\n    /**\n     * Disable full-site editing support.\n     *\n     * @link https://wptavern.com/gutenberg-10-5-embeds-pdfs-adds-verse-block-color-options-and-introduces-new-patterns\n     */\n    remove_theme_support('block-templates');\n\n    /**\n     * Register the navigation menus.\n     *\n     * @link https://developer.wordpress.org/reference/functions/register_nav_menus/\n     */\n    register_nav_menus([\n        'primary_navigation' => __('Primary Navigation', 'sage'),\n    ]);\n\n    /**\n     * Disable the default block patterns.\n     *\n     * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-the-default-block-patterns\n     */\n    remove_theme_support('core-block-patterns');\n\n    /**\n     * Enable plugins to manage the document title.\n     *\n     * @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag\n     */\n    add_theme_support('title-tag');\n\n    /**\n     * Enable post thumbnail support.\n     *\n     * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n     */\n    add_theme_support('post-thumbnails');\n\n    /**\n     * Enable responsive embed support.\n     *\n     * @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#responsive-embedded-content\n     */\n    add_theme_support('responsive-embeds');\n\n    /**\n     * Enable HTML5 markup support.\n     *\n     * @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5\n     */\n    add_theme_support('html5', [\n        'caption',\n        'comment-form',\n        'comment-list',\n        'gallery',\n        'search-form',\n        'script',\n        'style',\n    ]);\n\n    /**\n     * Enable selective refresh for widgets in customizer.\n     *\n     * @link https://developer.wordpress.org/reference/functions/add_theme_support/#customize-selective-refresh-widgets\n     */\n    add_theme_support('customize-selective-refresh-widgets');\n}, 20);\n\n/**\n * Register the theme sidebars.\n *\n * @return void\n */\nadd_action('widgets_init', function () {\n    $config = [\n        'before_widget' => '<section class=\"widget %1$s %2$s\">',\n        'after_widget' => '</section>',\n        'before_title' => '<h3>',\n        'after_title' => '</h3>',\n    ];\n\n    register_sidebar([\n        'name' => __('Primary', 'sage'),\n        'id' => 'sidebar-primary',\n    ] + $config);\n\n    register_sidebar([\n        'name' => __('Footer', 'sage'),\n        'id' => 'sidebar-footer',\n    ] + $config);\n});\n"
  },
  {
    "path": "composer.json",
    "content": "{\n  \"name\": \"roots/sage\",\n  \"type\": \"wordpress-theme\",\n  \"license\": \"MIT\",\n  \"description\": \"WordPress starter theme with a modern development workflow\",\n  \"homepage\": \"https://roots.io/sage/\",\n  \"authors\": [\n    {\n      \"name\": \"Ben Word\",\n      \"email\": \"ben@benword.com\",\n      \"homepage\": \"https://github.com/retlehs\"\n    },\n    {\n      \"name\": \"Scott Walkinshaw\",\n      \"email\": \"scott.walkinshaw@gmail.com\",\n      \"homepage\": \"https://github.com/swalkinshaw\"\n    },\n    {\n      \"name\": \"QWp6t\",\n      \"email\": \"hi@qwp6t.me\",\n      \"homepage\": \"https://github.com/qwp6t\"\n    },\n    {\n      \"name\": \"Brandon Nifong\",\n      \"email\": \"brandon@tendency.me\",\n      \"homepage\": \"https://github.com/log1x\"\n    }\n  ],\n  \"keywords\": [\n    \"wordpress\"\n  ],\n  \"support\": {\n    \"issues\": \"https://github.com/roots/sage/issues\",\n    \"forum\": \"https://discourse.roots.io/\"\n  },\n  \"autoload\": {\n    \"psr-4\": {\n      \"App\\\\\": \"app/\"\n    }\n  },\n  \"require\": {\n    \"php\": \">=8.2\",\n    \"roots/acorn\": \"^5.0\"\n  },\n  \"require-dev\": {\n    \"laravel/pint\": \"^1.20\"\n  },\n  \"suggest\": {\n    \"log1x/sage-directives\": \"A collection of useful Blade directives for WordPress and Sage (^1.0).\"\n  },\n  \"config\": {\n    \"optimize-autoloader\": true,\n    \"preferred-install\": \"dist\",\n    \"sort-packages\": true\n  },\n  \"minimum-stability\": \"dev\",\n  \"prefer-stable\": true,\n  \"scripts\": {\n    \"post-autoload-dump\": [\n      \"Roots\\\\Acorn\\\\ComposerScripts::postAutoloadDump\"\n    ]\n  }\n}\n"
  },
  {
    "path": "functions.php",
    "content": "<?php\n\nuse App\\Providers\\ThemeServiceProvider;\nuse Roots\\Acorn\\Application;\n\n/*\n|--------------------------------------------------------------------------\n| Register The Auto Loader\n|--------------------------------------------------------------------------\n|\n| Composer provides a convenient, automatically generated class loader for\n| our theme. We will simply require it into the script here so that we\n| don't have to worry about manually loading any of our classes later on.\n|\n*/\n\nif (! file_exists($composer = __DIR__.'/vendor/autoload.php')) {\n    wp_die(__('Error locating autoloader. Please run <code>composer install</code>.', 'sage'));\n}\n\nrequire $composer;\n\n/*\n|--------------------------------------------------------------------------\n| Register The Bootloader\n|--------------------------------------------------------------------------\n|\n| The first thing we will do is schedule a new Acorn application container\n| to boot when WordPress is finished loading the theme. The application\n| serves as the \"glue\" for all the components of Laravel and is\n| the IoC container for the system binding all of the various parts.\n|\n*/\n\nApplication::configure()\n    ->withProviders([\n        ThemeServiceProvider::class,\n    ])\n    ->boot();\n\n/*\n|--------------------------------------------------------------------------\n| Register Sage Theme Files\n|--------------------------------------------------------------------------\n|\n| Out of the box, Sage ships with categorically named theme files\n| containing common functionality and setup to be bootstrapped with your\n| theme. Simply add (or remove) files from the array below to change what\n| is registered alongside Sage.\n|\n*/\n\ncollect(['setup', 'filters'])\n    ->each(function ($file) {\n        if (! locate_template($file = \"app/{$file}.php\", true, true)) {\n            wp_die(\n                /* translators: %s is replaced with the relative file path */\n                sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file)\n            );\n        }\n    });\n"
  },
  {
    "path": "index.php",
    "content": "<?php\n\necho view(app('sage.view'), app('sage.data'))->render();\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"sage\",\n  \"private\": true,\n  \"engines\": {\n    \"node\": \">=20.0.0\"\n  },\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"translate\": \"npm run translate:pot && npm run translate:update\",\n    \"translate:pot\": \"wp i18n make-pot . ./resources/lang/sage.pot --include=\\\"theme.json,patterns,app,resources\\\"\",\n    \"translate:update\": \"for file in ./resources/lang/*.po; do wp i18n update-po ./resources/lang/sage.pot $file; done\",\n    \"translate:compile\": \"npm run translate:mo && npm run translate:js\",\n    \"translate:js\": \"wp i18n make-json ./resources/lang --pretty-print\",\n    \"translate:mo\": \"wp i18n make-mo ./resources/lang ./resources/lang\"\n  },\n  \"devDependencies\": {\n    \"@roots/vite-plugin\": \"^1.0.0\",\n    \"@tailwindcss/vite\": \"^4.0.0\",\n    \"laravel-vite-plugin\": \"^2.0.0\",\n    \"tailwindcss\": \"^4.0.0\",\n    \"vite\": \"^7.0.0\"\n  }\n}\n"
  },
  {
    "path": "public/.gitkeep",
    "content": ""
  },
  {
    "path": "resources/css/app.css",
    "content": "@import \"tailwindcss\" theme(static);\n@source \"../../app/**/*.php\";\n@source \"../**/*.blade.php\";\n@source \"../**/*.js\";\n"
  },
  {
    "path": "resources/css/editor.css",
    "content": "@import \"tailwindcss\";\n"
  },
  {
    "path": "resources/fonts/.gitkeep",
    "content": ""
  },
  {
    "path": "resources/images/.gitkeep",
    "content": ""
  },
  {
    "path": "resources/js/app.js",
    "content": "import.meta.glob([\r\n  '../images/**',\r\n  '../fonts/**',\r\n]);\r\n"
  },
  {
    "path": "resources/js/editor.js",
    "content": "import domReady from '@wordpress/dom-ready';\n\ndomReady(() => {\n  //\n});\n"
  },
  {
    "path": "resources/views/404.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n  @include('partials.page-header')\n\n  @if (! have_posts())\n    <x-alert type=\"warning\">\n      {!! __('Sorry, but the page you are trying to view does not exist.', 'sage') !!}\n    </x-alert>\n\n    {!! get_search_form(false) !!}\n  @endif\n@endsection\n"
  },
  {
    "path": "resources/views/components/alert.blade.php",
    "content": "@props([\n  'type' => null,\n  'message' => null,\n])\n\n@php($class = match ($type) {\n  'success' => 'text-green-50 bg-green-400',\n  'caution' => 'text-yellow-50 bg-yellow-400',\n  'warning' => 'text-red-50 bg-red-400',\n  default => 'text-indigo-50 bg-indigo-400',\n})\n\n<div {{ $attributes->merge(['class' => \"px-2 py-1 {$class}\"]) }}>\n  {!! $message ?? $slot !!}\n</div>\n"
  },
  {
    "path": "resources/views/forms/search.blade.php",
    "content": "<form role=\"search\" method=\"get\" class=\"search-form\" action=\"{{ home_url('/') }}\">\n  <label>\n    <span class=\"sr-only\">\n      {{ _x('Search for:', 'label', 'sage') }}\n    </span>\n\n    <input\n      type=\"search\"\n      placeholder=\"{!! esc_attr_x('Search &hellip;', 'placeholder', 'sage') !!}\"\n      value=\"{{ get_search_query() }}\"\n      name=\"s\"\n    >\n  </label>\n\n  <button>{{ _x('Search', 'submit button', 'sage') }}</button>\n</form>\n"
  },
  {
    "path": "resources/views/index.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n  @include('partials.page-header')\n\n  @if (! have_posts())\n    <x-alert type=\"warning\">\n      {!! __('Sorry, no results were found.', 'sage') !!}\n    </x-alert>\n\n    {!! get_search_form(false) !!}\n  @endif\n\n  @while(have_posts()) @php(the_post())\n    @includeFirst(['partials.content-' . get_post_type(), 'partials.content'])\n  @endwhile\n\n  {!! get_the_posts_navigation() !!}\n@endsection\n\n@section('sidebar')\n  @include('sections.sidebar')\n@endsection\n"
  },
  {
    "path": "resources/views/layouts/app.blade.php",
    "content": "<!doctype html>\n<html @php(language_attributes())>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    @php(do_action('get_header'))\n    @php(wp_head())\n\n    @vite(['resources/css/app.css', 'resources/js/app.js'])\n  </head>\n\n  <body @php(body_class())>\n    @php(wp_body_open())\n\n    <div id=\"app\">\n      <a class=\"sr-only focus:not-sr-only\" href=\"#main\">\n        {{ __('Skip to content', 'sage') }}\n      </a>\n\n      @include('sections.header')\n\n      <main id=\"main\" class=\"main\">\n        @yield('content')\n      </main>\n\n      @hasSection('sidebar')\n        <aside class=\"sidebar\">\n          @yield('sidebar')\n        </aside>\n      @endif\n\n      @include('sections.footer')\n    </div>\n\n    @php(do_action('get_footer'))\n    @php(wp_footer())\n  </body>\n</html>\n"
  },
  {
    "path": "resources/views/page.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n  @while(have_posts()) @php(the_post())\n    @include('partials.page-header')\n    @includeFirst(['partials.content-page', 'partials.content'])\n  @endwhile\n@endsection\n"
  },
  {
    "path": "resources/views/partials/comments.blade.php",
    "content": "@if (! post_password_required())\n  <section id=\"comments\" class=\"comments\">\n    @if ($responses())\n      <h2>\n        {!! $title !!}\n      </h2>\n\n      <ol class=\"comment-list\">\n        {!! $responses !!}\n      </ol>\n\n      @if ($paginated())\n        <nav aria-label=\"Comment\">\n          <ul class=\"pager\">\n            @if ($previous())\n              <li class=\"previous\">\n                {!! $previous !!}\n              </li>\n            @endif\n\n            @if ($next())\n              <li class=\"next\">\n                {!! $next !!}\n              </li>\n            @endif\n          </ul>\n        </nav>\n      @endif\n    @endif\n\n    @if ($closed())\n      <x-alert type=\"warning\">\n        {!! __('Comments are closed.', 'sage') !!}\n      </x-alert>\n    @endif\n\n    @php(comment_form())\n  </section>\n@endif\n"
  },
  {
    "path": "resources/views/partials/content-page.blade.php",
    "content": "@php(the_content())\n\n@if ($pagination())\n  <nav class=\"page-nav\" aria-label=\"Page\">\n    {!! $pagination !!}\n  </nav>\n@endif\n"
  },
  {
    "path": "resources/views/partials/content-search.blade.php",
    "content": "<article @php(post_class())>\n  <header>\n    <h2 class=\"entry-title\">\n      <a href=\"{{ get_permalink() }}\">\n        {!! $title !!}\n      </a>\n    </h2>\n\n    @includeWhen(get_post_type() === 'post', 'partials.entry-meta')\n  </header>\n\n  <div class=\"entry-summary\">\n    @php(the_excerpt())\n  </div>\n</article>\n"
  },
  {
    "path": "resources/views/partials/content-single.blade.php",
    "content": "<article @php(post_class('h-entry'))>\n  <header>\n    <h1 class=\"p-name\">\n      {!! $title !!}\n    </h1>\n\n    @include('partials.entry-meta')\n  </header>\n\n  <div class=\"e-content\">\n    @php(the_content())\n  </div>\n\n  @if ($pagination())\n    <footer>\n      <nav class=\"page-nav\" aria-label=\"Page\">\n        {!! $pagination !!}\n      </nav>\n    </footer>\n  @endif\n\n  @php(comments_template())\n</article>\n"
  },
  {
    "path": "resources/views/partials/content.blade.php",
    "content": "<article @php(post_class())>\n  <header>\n    <h2 class=\"entry-title\">\n      <a href=\"{{ get_permalink() }}\">\n        {!! $title !!}\n      </a>\n    </h2>\n\n    @include('partials.entry-meta')\n  </header>\n\n  <div class=\"entry-summary\">\n    @php(the_excerpt())\n  </div>\n</article>\n"
  },
  {
    "path": "resources/views/partials/entry-meta.blade.php",
    "content": "<time class=\"dt-published\" datetime=\"{{ get_post_time('c', true) }}\">\n  {{ get_the_date() }}\n</time>\n\n<p>\n  <span>{{ __('By', 'sage') }}</span>\n  <a href=\"{{ get_author_posts_url(get_the_author_meta('ID')) }}\" class=\"p-author h-card\">\n    {{ get_the_author() }}\n  </a>\n</p>\n"
  },
  {
    "path": "resources/views/partials/page-header.blade.php",
    "content": "<div class=\"page-header\">\n  <h1>{!! $title !!}</h1>\n</div>\n"
  },
  {
    "path": "resources/views/search.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n  @include('partials.page-header')\n\n  @if (! have_posts())\n    <x-alert type=\"warning\">\n      {!! __('Sorry, no results were found.', 'sage') !!}\n    </x-alert>\n\n    {!! get_search_form(false) !!}\n  @endif\n\n  @while(have_posts()) @php(the_post())\n    @include('partials.content-search')\n  @endwhile\n\n  {!! get_the_posts_navigation() !!}\n@endsection\n"
  },
  {
    "path": "resources/views/sections/footer.blade.php",
    "content": "<footer class=\"content-info\">\n  @php(dynamic_sidebar('sidebar-footer'))\n</footer>\n"
  },
  {
    "path": "resources/views/sections/header.blade.php",
    "content": "<header class=\"banner\">\n  <a class=\"brand\" href=\"{{ home_url('/') }}\">\n    {!! $siteName !!}\n  </a>\n\n  @if (has_nav_menu('primary_navigation'))\n    <nav class=\"nav-primary\" aria-label=\"{{ wp_get_nav_menu_name('primary_navigation') }}\">\n      {!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}\n    </nav>\n  @endif\n</header>\n"
  },
  {
    "path": "resources/views/sections/sidebar.blade.php",
    "content": "@php(dynamic_sidebar('sidebar-primary'))\n"
  },
  {
    "path": "resources/views/single.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n  @while(have_posts()) @php(the_post())\n    @includeFirst(['partials.content-single-' . get_post_type(), 'partials.content-single'])\n  @endwhile\n@endsection\n"
  },
  {
    "path": "resources/views/template-custom.blade.php",
    "content": "{{--\n  Template Name: Custom Template\n--}}\n\n@extends('layouts.app')\n\n@section('content')\n  @while(have_posts()) @php(the_post())\n    @include('partials.page-header')\n    @include('partials.content-page')\n  @endwhile\n@endsection\n"
  },
  {
    "path": "style.css",
    "content": "/*\nTheme Name:         Sage Starter Theme\nTheme URI:          https://roots.io/sage/\nDescription:        Sage is a WordPress starter theme.\nVersion:            11.x-dev\nAuthor:             Roots\nAuthor URI:         https://roots.io/\nText Domain:        sage\nLicense:            MIT License\nLicense URI:        https://opensource.org/licenses/MIT\nRequires PHP:       8.2\nRequires at least:  6.6\n*/\n"
  },
  {
    "path": "theme.json",
    "content": "{\n  \"__preprocessed__\": \"This file is used to build the theme.json file in the `public/build/assets` directory. The built artifact includes Tailwind's colors, fonts, and font sizes.\",\n  \"$schema\": \"https://schemas.wp.org/trunk/theme.json\",\n  \"version\": 3,\n  \"settings\": {\n    \"layout\": {\n      \"contentSize\": \"48rem\"\n    },\n    \"background\": {\n      \"backgroundImage\": true\n    },\n    \"color\": {\n      \"custom\": false,\n      \"customDuotone\": false,\n      \"customGradient\": false,\n      \"defaultDuotone\": false,\n      \"defaultGradients\": false,\n      \"defaultPalette\": false,\n      \"duotone\": []\n    },\n    \"custom\": {\n      \"spacing\": {},\n      \"typography\": {\n        \"font-size\": {},\n        \"line-height\": {}\n      }\n    },\n    \"spacing\": {\n      \"padding\": true,\n      \"units\": [\"px\", \"%\", \"em\", \"rem\", \"vw\", \"vh\"]\n    },\n    \"typography\": {\n      \"defaultFontSizes\": false,\n      \"customFontSize\": false\n    }\n  }\n}\n"
  },
  {
    "path": "vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport tailwindcss from '@tailwindcss/vite';\nimport laravel from 'laravel-vite-plugin'\nimport { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';\n\n// Set APP_URL if it doesn't exist for Laravel Vite plugin\nif (! process.env.APP_URL) {\n  process.env.APP_URL = 'http://example.test';\n}\n\nexport default defineConfig({\n  base: '/app/themes/sage/public/build/',\n  plugins: [\n    tailwindcss(),\n    laravel({\n      input: [\n        'resources/css/app.css',\n        'resources/js/app.js',\n        'resources/css/editor.css',\n        'resources/js/editor.js',\n      ],\n      refresh: true,\n    }),\n\n    wordpressPlugin(),\n\n    // Generate the theme.json file in the public/build/assets directory\n    // based on the Tailwind config and the theme.json file from base theme folder\n    wordpressThemeJson({\n      disableTailwindColors: false,\n      disableTailwindFonts: false,\n      disableTailwindFontSizes: false,\n      disableTailwindBorderRadius: false,\n    }),\n  ],\n  resolve: {\n    alias: {\n      '@scripts': '/resources/js',\n      '@styles': '/resources/css',\n      '@fonts': '/resources/fonts',\n      '@images': '/resources/images',\n    },\n  },\n})\n"
  }
]