VMRCommunications / General

CDN deployment of VMR GPT client assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Netlify Status

General

VMR GPT Client Assets Builder and Deployment Workflow

Example usage

Add inside <head> tag after the Google gpt.js library script

<script async src="https://cdn2.vmrcommunications.com/crux/dist/js/vmr-crux-gpt.min.js"></script>

Ad slots should be defined inside the HTML body like this (note there is no inline script tag!)

<!-- GPT AdSlot 1 for Ad unit 'CruxNow.com_New_300x250' ### Size: [[300,250]] -->
<div id='div-gpt-ad-3284456-1'></div>
<!-- End AdSlot 1 -->

Local development

1. Clone this repository

git clone https://github.com/VMRCommunications/General.git General

2. Navigate to the directory

cd /my/path/to/General

3. Install dependencies locally

npm install

4. Add .env file and environment variable for development

echo 'ELEVENTY_ENV=development' > .env

5. Build files

npx @11ty/eleventy

Or serve during development

npx @11ty/eleventy --serve

About

CDN deployment of VMR GPT client assets


Languages

Language:HTML 55.0%Language:JavaScript 35.1%Language:Nunjucks 9.9%