{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-09-09T13:48:30Z","object_id":{"id":1457,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_development","title":"mod_development","uri":"https:\/\/zotonic.com\/id\/1457"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:47:53Z","object_id":{"id":1457,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_development","title":"mod_development","uri":"https:\/\/zotonic.com\/id\/1457"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:48:30Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:30Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:30Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":3},{"created":"2026-09-09T13:48:30Z","object_id":{"id":2667,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_url","title":"URL","uri":"https:\/\/zotonic.com\/id\/2667"},"seq":4},{"created":"2026-09-09T13:48:30Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5},{"created":"2026-09-09T13:48:30Z","object_id":{"id":2688,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_performance","title":"Performance","uri":"https:\/\/zotonic.com\/id\/2688"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1372,"is_a":["text","documentation","reference","template_tag"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1372"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_tag_tag_lib","page_url":{"en":"https:\/\/zotonic.com\/docs\/1372\/lib","x-default":"https:\/\/zotonic.com\/docs\/1372\/lib"},"preview_url":null,"resource":{"version":3985,"pivot_location_lat":null,"title":"lib","is_authoritative":true,"body":"<aside><p>See also<\/p><p><a href=\"\/id\/doc_module_mod_development\" class=\"doc-reference doc-reference-module\"><code>module#mod_development<\/code><\/a>.<\/p><\/aside>\n<p>Combine css and javascript includes in a single request.<\/p>\n<p>Generates a <code>&lt;link \/\\&gt;<\/code> or <code>&lt;script \/\\&gt;<\/code> element for including the given libraries. This combines all css and javascript files in one request, saving multiple roundtrips to the server.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% lib\n      &quot;css\/zp-compressed.css&quot;\n      &quot;css\/zp-admin.css&quot;\n      &quot;css\/zp-wysiwyg.css&quot;\n      &quot;css\/zp-dialog.css&quot;\n      &quot;css\/zp-formreplace.css&quot;\n      &quot;css\/zp-finder.css&quot;\n      &quot;css\/zp-growl.css&quot;\n  %}\n<\/code><\/pre>\n<p>Will output:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">&lt;link href=&quot;\/lib\/css\/zp-compressed~zp-admin~zp-wysiwyg~zp-dialog~zp-formreplace~zp-finder~zp-growl~63417066183.css&quot; type=&quot;text\/css&quot; media=&quot;all&quot; rel=&quot;stylesheet&quot; \/&gt;\n<\/code><\/pre>\n<p>The number at the end is the Unix modification time of the most recently changed file.<\/p>\n<p>The lib tag supports optional arguments to control the resulting html tag. The arguments are supplied after the list of files:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% lib\n  &quot;css\/not-so-important-styles.css&quot;\n  minify\n  async\n%}\n<\/code><\/pre>\n<p>Accepted arguments are:<\/p>\n<table class=\"table\"><thead><tr><th>Option<\/th><th>Default<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>absolute\\_url<\/td><td>false<\/td><td>If true, prefix the generated URL with “<a href=\"https:\/\">https:\/<\/a>\/\\{hostname\\}\/”.<\/td><\/tr><tr><td>title<\/td><td>&lt;empty&gt;<\/td><td>Specify a value for the title attribute of the link tag.<\/td><\/tr><tr><td>media<\/td><td>“all”<\/td><td>Specify value for the media attribute of the link tag.<\/td><\/tr><tr><td>rel<\/td><td>“stylesheet”<\/td><td>Specify value for the rel attribute of the link tag.<\/td><\/tr><tr><td>minify<\/td><td><\/td><td>Force minification use as <code>{% lib ... minify %}<\/code><\/td><\/tr><tr><td>nocache<\/td><td><\/td><td>Let the browser cacte the URL at most 1 second  <code>{% lib ... nocache %}<\/code><\/td><\/tr><tr><td>async<\/td><td><\/td><td>Load css or javascript asynchronously, use as  <code>{% lib ... async %}<\/code><\/td><\/tr><tr><td>defer<\/td><td><\/td><td>Load javascript in parallel and executes it after the page has finished parsing, use as <code>{% lib ... defer %}<\/code><\/td><\/tr><\/tbody><\/table>\n<p>The <code>`minify`<\/code> argument can be enabled for all lib tags by setting the config <code>`site.minification_enabled`<\/code> to a true-ish value (like <code>`1`<\/code>).<\/p>\n<div class=\"admonition note\"><p class=\"first admonition-title\">Note<\/p><p class=\"last\">The <code>defer<\/code> argument is set even if the <code>async<\/code> attribute is specified to cause legacy Web browsers that only support defer (and not async) to fall back to the defer behavior instead of the synchronous blocking behavior that is the default. See more in <a href=\"https:\/\/www.w3.org\/TR\/2011\/WD-html5-20110525\/scripting-1.html#attr-script-async\">W3<\/a> documentation.<\/p><\/div>","slug":"lib","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"6e3eaefa5c984941e464e3cdce9dd6c98f9bbfa6d99c6aafe72f05340406592f","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":324,"is_a":["meta","category"],"name":"template_tag","title":"Tags","uri":"https:\/\/test.zotonic.com\/id\/324"},"doc_source_path":"doc\/template-tags\/lib.md","publication_start":"2023-06-24T08:17:56Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/template-tags\/lib.md","pivot_location_lng":null,"doc_source_kind":"template_tag","name":"doc_template_tag_tag_lib","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:20Z","uri":null,"doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"0b3bab3bb18f64f97acf92b23ea5baf8ae6b410f\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-30T09:00:42Z","title_slug":"lib"},"uri":"https:\/\/zotonic.com\/id\/1372","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1372"}},"status":"ok"}