Skip to content
Snippets Groups Projects
Commit c6b962df authored by Georgi's avatar Georgi
Browse files

[BUGFIX] Improve README.md

parent ad785c95
No related branches found
No related tags found
No related merge requests found
......@@ -26,20 +26,6 @@ plugin.tx_sgyoutube {
}
```
### JavaScript integration
Note: You can still use the old implementation of the lightbox without the new lightbox by
importing ```youtubeLightbox``` instead of ```sgYoutubeLightbox```.
Install the **project_theme_lightbox** extension and integrate it to your main theme. Import the
file ```sgYoutubeLight.js``` to your JavaScript and initilize it.
```javascript
import SgVideoLightbox from 'sgYoutubeLightbox';
new SgVideoLightbox();
```
### Registration for more than the free 10.000 quotas per day
It's not 1 quota per 1 API call. Each API has its own costs, which can be seen in the link below.
......@@ -71,7 +57,28 @@ If the `?disableYoutubeCache=1` parameter is added to the URL, this cache will b
You can use a different API key for specific sites. You can implement a TypoScript page uid check and just change the
key from the "TypoScript integration" topic.
### Compiling CSS/JS assets
### Making changes in the JavaScript/CSS
We are shippning the extension with source files and already minified assets. By default
we the minified assets are loaded in the Layout, so that the extension works out of the box just with plug and play.
Should you want to change this behavior you can do to the following:
- Override the layout file in TypoScript
``` view {
layoutRootPath = EXT:project_theme/Resources/Private/Layouts/SgYouTube/
}
```
- Remove the CSS or JavaScript loading code from the layout
```
<div class="tx-sg-youtube">
<f:asset.script identifier="sgVideoJs" src="EXT:sg_youtube/Resources/Public/JavaScript/Dist/main.bundled.min.js" />
<f:render section="main"/>
</div>
```
- Import the CSS or JavaScript source files in your respective asset pipeline
### Compiling CSS/JS assets with SGC
- Install the sgalinski/sgc-core library via composer
- Add the sg-youtube extension paths in the .sgc-config.json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment