<commit_before># Sites
On the frontend development side of things TwigYard is pretty technology agnostic. Type raw css or use grunt, gulp or whatever you like. You do not need to modify your devstack in any way. Within the site folder you are free to use any tools you like to as long as they generate the required files.   

## site.yml
TwigYard requires that each site has a main config file whose name is defined in the instance wide `parameters.yml` file. While the name can be anything, it is recommended to name it `site.yml` if possible. For simplicity we will refer to this main site config as `site.yml` in this manual.

See the middleware reference for supported configuration options.

### Includes
The `site.yml` can include other files to make the configuration more flexible.
This feature has two benefits.

First, it allows the config to be broken up into multiple files for better readability.
```
...
imports:
    - { resource: 'router.yml' }
    - { resource: 'renderer.yml' }
```
Second, it makes it possible to have the site behave differently on different instances. If, for example, we would like to have a staging instance where the site must be protected by httpauth header, we would have the following in `site_staging.yml` and set the instance to use this is the main config file. 
 ```
httpauth:
    username: user
    password: <PASSWORD>

imports:
    - { resource: 'site.yml' }
 ```

### Example 
```
url:
    canonical: www.example.com
    extra: [ example.com, web.example.com ]
 
httpauth:
    username: user
    password: <PASSWORD>
 
locale:
    default:
        key: cs
        name: cs_CZ
    extra: { en: en_US, es: es_ES }
  
data:
    contact: contact.yml
    products: products.yml
 
router:
    index:
        cs_CZ: /
        en_US: /
        es_ES: /
    product:
        cs_CZ: /zbozi/{product_id | products:manufacturer.id}
        en_US: /products/{product_id | products:manufacturer.id}
        es_ES: /productos/{product_id | products:manufacturer.id}
 <commit_msg>Fix markdown syntax in docs<commit_after># Sites
On the frontend development side of things TwigYard is pretty technology agnostic. Type raw css or use grunt, gulp or whatever you like. You do not need to modify your devstack in any way. Within the site folder you are free to use any tools you like to as long as they generate the required files.   

## site.yml
TwigYard requires that each site has a main config file whose name is defined in the instance wide `parameters.yml` file. While the name can be anything, it is recommended to name it `site.yml` if possible. For simplicity we will refer to this main site config as `site.yml` in this manual.

See the middleware reference for supported configuration options.

### Includes
The `site.yml` can include other files to make the configuration more flexible.
This feature has two benefits.

First, it allows the config to be broken up into multiple files for better readability.
```
...
imports:
    - { resource: 'router.yml' }
    - { resource: 'renderer.yml' }
```
Second, it makes it possible to have the site behave differently on different instances. If, for example, we would like to have a staging instance where the site must be protected by httpauth header, we would have the following in `site_staging.yml` and set the instance to use this is the main config file.
```
httpauth:
    username: user
    password: <PASSWORD>

imports:
    - { resource: 'site.yml' }
```

### Example 
```
url:
    canonical: www.example.com
    extra: [ example.com, web.example.com ]
 
httpauth:
    username: user
    password: <PASSWORD>
 
locale:
    default:
        key: cs
        name: cs_CZ
    extra: { en: en_US, es: es_ES }
  
data:
    contact: contact.yml
    products: products.yml
 
router:
    index:
        cs_CZ: /
        en_US: /
        es_ES: /
    product:
        cs_CZ: /zbozi/{product_id | products:manufacturer.id}
        en_US: /products/{product_id | products:manufacturer.id}
        es_ES: /productos/{product_id | products:manufacturer.id}
 
{'fraction_non_alphanumeric': 0.07823718742262936, 'fraction_numerical': 0.0, 'mean_word_length': 3.190871369294606, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1310467', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1145, 'n_words': 522}