Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add attributes to the Site config #3996

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Commits on Jul 14, 2021

  1. feat: add attributes to the Site config

    now you can define site-specific `attributes` in your config/statamic/sites.php
    This is useful if you want to define different themes per site for example.
    
    ```php
    <?php
    
    return [
        'sites' => [
            'default' => [
                'name' => config('app.name'),
                'locale' => 'en_US',
                'url' => '/',
    
                'attributes' => [
                    'theme' => 'default',
                ],
            ]
        ]
    ];
    ```
    
    This can now be used to set a class:
    ```html
    <body class="theme-{{ site:attributes:theme }}">
        <!-- [...] -->
    </body>
    ```
    RafaelKr committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    95a701e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37044b3 View commit details
    Browse the repository at this point in the history