{"action":"created","issue":{"url":"https://api.github.com/repos/gantry/gantry5/issues/330","labels_url":"https://api.github.com/repos/gantry/gantry5/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/gantry/gantry5/issues/330/comments","events_url":"https://api.github.com/repos/gantry/gantry5/issues/330/events","html_url":"https://github.com/gantry/gantry5/issues/330","id":79010666,"number":330,"title":"Atoms not being inserted into site","user":{"login":"alisamii","id":1498512,"avatar_url":"https://avatars.githubusercontent.com/u/1498512?v=3","gravatar_id":"","url":"https://api.github.com/users/alisamii","html_url":"https://github.com/alisamii","followers_url":"https://api.github.com/users/alisamii/followers","following_url":"https://api.github.com/users/alisamii/following{/other_user}","gists_url":"https://api.github.com/users/alisamii/gists{/gist_id}","starred_url":"https://api.github.com/users/alisamii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alisamii/subscriptions","organizations_url":"https://api.github.com/users/alisamii/orgs","repos_url":"https://api.github.com/users/alisamii/repos","events_url":"https://api.github.com/users/alisamii/events{/privacy}","received_events_url":"https://api.github.com/users/alisamii/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gantry/gantry5/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/gantry/gantry5/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gantry/gantry5/milestones/14","html_url":"https://github.com/gantry/gantry5/milestones/5.1.1","labels_url":"https://api.github.com/repos/gantry/gantry5/milestones/14/labels","id":1254022,"number":14,"title":"5.1.1","description":"","creator":{"login":"w00fz","id":11734,"avatar_url":"https://avatars.githubusercontent.com/u/11734?v=3","gravatar_id":"","url":"https://api.github.com/users/w00fz","html_url":"https://github.com/w00fz","followers_url":"https://api.github.com/users/w00fz/followers","following_url":"https://api.github.com/users/w00fz/following{/other_user}","gists_url":"https://api.github.com/users/w00fz/gists{/gist_id}","starred_url":"https://api.github.com/users/w00fz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w00fz/subscriptions","organizations_url":"https://api.github.com/users/w00fz/orgs","repos_url":"https://api.github.com/users/w00fz/repos","events_url":"https://api.github.com/users/w00fz/events{/privacy}","received_events_url":"https://api.github.com/users/w00fz/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":41,"state":"open","created_at":"2015-08-13T18:14:27Z","updated_at":"2015-08-27T12:29:55Z","due_on":"2015-08-28T07:00:00Z","closed_at":null},"comments":14,"created_at":"2015-05-21T14:10:24Z","updated_at":"2015-08-27T12:36:31Z","closed_at":null,"body":"Tried to create a new atom to insert the TypeKit javascript in the site.\r\n\r\nHere's the code I used:\r\n\r\n**The YAML**\r\n```\r\nname: Adobe Typekit\r\ndescription: Configure Adobe Typekit.\r\ntype: atom\r\n\r\nform:\r\n  fields:\r\n    enabled:\r\n      type: input.checkbox\r\n      label: Enabled\r\n      description: Globally enable Typekit particles.\r\n      default: false\r\n\r\n    kit.id:\r\n      type: input.text\r\n      description: Enter the Adobe Typekit ID.\r\n      label: Adobe Typekit\r\n```\r\n**The Twig**\r\n```\r\n{% extends '@nucleus/partials/particle.html.twig' %}\r\n\r\n{% block javascript %}\r\n  {{ parent() }}\r\n  {% if particle.kit.id  %}\r\n    <script src=\"//use.typekit.net/{{ particle.kit.id }}.js\"></script>\r\n    <script>try{Typekit.load();}catch(e){}</script>\r\n  {% endif %}\r\n{% endblock %}\r\n```\r\nThe code generates the backend element without a problem.\r\n![screen 20shot 20on 202015-05-21 20at 2016 3a05 3a27](https://cloud.githubusercontent.com/assets/1498512/7750241/5b8c8538-ffd3-11e4-966f-791e239c1939.png)\r\n\r\nHowever no code is injected in the site on the front-end.\r\n\r\nTried to enable the Google Analytics atom to test.\r\n\r\nSame issue, does not get inserted into the generated front-end code.\r\n\r\nAlso, would like to know where Javascript Atoms are injected? Are they inserted in the `<head>` element or at the end of the `<body>` element?\r\n\r\nIf they are injected at the end of the `<body>` element, is there a way to add a toggle or select box to allow the end-user to choose between `<body>` element and `<head>` element?"},"comment":{"url":"https://api.github.com/repos/gantry/gantry5/issues/comments/135408898","html_url":"https://github.com/gantry/gantry5/issues/330#issuecomment-135408898","issue_url":"https://api.github.com/repos/gantry/gantry5/issues/330","id":135408898,"user":{"login":"mahagr","id":854915,"avatar_url":"https://avatars.githubusercontent.com/u/854915?v=3","gravatar_id":"","url":"https://api.github.com/users/mahagr","html_url":"https://github.com/mahagr","followers_url":"https://api.github.com/users/mahagr/followers","following_url":"https://api.github.com/users/mahagr/following{/other_user}","gists_url":"https://api.github.com/users/mahagr/gists{/gist_id}","starred_url":"https://api.github.com/users/mahagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahagr/subscriptions","organizations_url":"https://api.github.com/users/mahagr/orgs","repos_url":"https://api.github.com/users/mahagr/repos","events_url":"https://api.github.com/users/mahagr/events{/privacy}","received_events_url":"https://api.github.com/users/mahagr/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T12:36:31Z","updated_at":"2015-08-27T12:36:31Z","body":"Small status update on this one:\r\n\r\n* Ability to set atom only in base outline has been assigned to 5.2.0 milestone (#340)\r\n* There's a new and better way to assign CSS / JSS into the page:\r\n\r\n    {% assets in 'head' with { priority: 1 } %}\r\n        <script type=\"text/javascript\" src=\"{{ url('gantry-theme://js/my.js') }}\"></script>\r\n        <link rel=\"stylesheet\" href=\"{{ url('gantry-assets://css/font-awesome.min.css') }}\" type=\"text/css\"/>\r\n    {% endassets -%}\r\n\r\nYou can also use ```{% scripts %}``` and ```{% styles %}```, they will take the same optional parameters. Possible locations are *head* and *footer*, priority can be any integer, though -10 ... 10 is what Gantry itself uses defaulting to 0."}}