Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti authored Jan 12, 2023
1 parent 72e2bcd commit 6705e38
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ location ~ ^/(?:.*)-assets/(.*)$ {
```
or something equivalent to your web server configuration.

Custom "assets" must be run through `file_url_generator` service. For example:

```php
/** @var \Drupal\Core\File\FileUrlGeneratorInterface $service */
$service = \Drupal::service('file_url_generator');
$default_image = $service->generate("{$theme->getPath()}/src/images/og-global.png")
->toString(TRUE)
->getGeneratedUrl();
```

### Disallow search engines/robots from indexing the site

Set `helfi_proxy.settings.robots_header_enabled` configuration to `TRUE`.
Expand Down

0 comments on commit 6705e38

Please sign in to comment.