Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/longitude-one/meta-bundle
A symfony bundle to manage your meta tags and increase referencement of your application
https://github.com/longitude-one/meta-bundle
Last synced: about 5 hours ago
JSON representation
A symfony bundle to manage your meta tags and increase referencement of your application
- Host: GitHub
- URL: https://github.com/longitude-one/meta-bundle
- Owner: longitude-one
- License: mit
- Created: 2022-04-04T05:58:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-07T16:47:34.000Z (over 2 years ago)
- Last Synced: 2024-04-10T04:45:26.954Z (7 months ago)
- Language: PHP
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MetaBundle : longitude-one/meta-bundle
This bundle provides a Twig extension and an easy configurable file to customize contents of all your meta tags.
## Installation
```shell
composer require longitude-one/meta-bundle
```## Configuration
Edit your twig base view to call functions `meta_description()`, `meta_title()`, `meta('foo:bar')` implemented by our twig extension.Example:
```html
{{ meta_title() }}```
Create or edit the bundle configuration file and
```yaml
# config/packages/meta.yaml
meta:
defaults:
description: 'My default description' # the default description
'og-image': 'My default image' # the default image
title: 'My default title' # the default title
paths:
'/foo/bar/': # For this url, our extension will return customs
description: 'My custom description for /foo/bar url'
'og-image': 'My custom image for /foo/bar url'
title: 'My custom title for /foo/bar url'
'/bar': #For this url, our extension will return a custom title and the default image and title.
title: 'My custom description for /bar url'
```# Contributing
* Fork the github project.
* Clone itA very simple docker is embedded to:
* provide you a PHP8.1 environment
* provide you composer, symfony and phpcsfixer as external tools
* launch local symfony server to help you to devThen simply build your container:
````shell
docker-compose up --build
````With your browser, you can access the embedded application by accessing the symfony local server http://127.0.0.1/
Update the code, fix bugs or implement new feature, then check the test.
````shell
docker exec bundle-php ./vendor/bin/phpunit
````Check quality code with PHP-CS-FIXER:
````shell
docker exec bundle-php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=tools/php-cs-fixer/.php-cs-fixer.php
````All is OK ? commit your code, push it and pull request it ;)