{"id":15608654,"url":"https://github.com/hypercubed/docpad-plugin-geturl","last_synced_at":"2025-04-28T11:49:40.302Z","repository":{"id":57214174,"uuid":"10618566","full_name":"Hypercubed/docpad-plugin-geturl","owner":"Hypercubed","description":"Take a href URL and an optional base URL and resolve them as a browser would for an anchor tag. Useful for calculating URLs relative to @site.url.","archived":false,"fork":false,"pushed_at":"2013-12-20T06:32:07.000Z","size":144,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-21T22:08:28.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hypercubed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-11T09:38:13.000Z","updated_at":"2016-05-12T17:21:11.000Z","dependencies_parsed_at":"2022-08-26T13:31:06.860Z","dependency_job_id":null,"html_url":"https://github.com/Hypercubed/docpad-plugin-geturl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fdocpad-plugin-geturl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fdocpad-plugin-geturl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fdocpad-plugin-geturl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypercubed%2Fdocpad-plugin-geturl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hypercubed","download_url":"https://codeload.github.com/Hypercubed/docpad-plugin-geturl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233217153,"owners_count":18643036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T05:21:47.338Z","updated_at":"2025-01-10T00:42:19.225Z","avatar_url":"https://github.com/Hypercubed.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Url Plugin for [DocPad](http://docpad.org)\n\nTake a href URL and an optional base URL and resolve them as a browser would for an anchor tag. Useful for calculating URLs relative to @site.url. See examples below.\n\n## Install\n\n```\nnpm install --save docpad-plugin-geturl\n```\n\n## Install for testing\n\n```\ngit clone https://github.com/Hypercubed/docpad-plugin-geturl.git\ncd docpad-plugin-geturl\nnpm install\nmake compile\n```\n\n## Test\n\n```\nmake test\n```\n\n## Configuration\n\nRequires a @site.url:\n\n```\n# ...\n  templateData:\n\t\tsite:\n\t\t\turl: 'http://localhost:9778'\n# ...\n```\n\n## Examples\n\n### Absolute\n| Call\t\t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl('/')\t\t\t\t\t\t\t\t| http://localhost:9778/\t\t\t\t|\n| @getUrl('/test')\t\t\t\t\t\t\t| http://localhost:9778/test\t\t\t|\n| @getUrl('/test/')\t\t\t\t\t\t\t| http://localhost:9778/test/\t\t\t|\n| @getUrl('/test.html')\t\t\t\t\t\t| http://localhost:9778/test.html\t\t|\n\n### Relative\n| Call  \t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl('')\t\t\t\t\t\t\t\t| http://localhost:9778/document.md\t\t\t\t|\n| @getUrl('test.html')\t\t\t\t\t\t| http://localhost:9778/test.html \t\t|\n| @getUrl('../test.html')\t\t\t\t\t| http://localhost:9778/test.html \t|\n\n### External\n| Call  \t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl('//test.com')\t\t\t\t\t\t| http://test.com/ \t\t\t|\n| @getUrl('http://test.com')\t\t\t\t| http://test.com/\t\t|\n| @getUrl('https://test.com')\t\t\t\t| https://test.com/\t\t|\n| @getUrl('test.html', 'https://test.com')\t\t\t\t| https://test.com/test.html\t\t|\n| @getUrl('../test.html', 'https://test.com/sub/')\t\t\t\t| https://test.com/test.html\t\t|\n\n### Objects\n| Call  \t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl(@document)\t\t\t\t\t\t| http://localhost:9778/document.md\t\t\t\t|\n\n### Arrays\n| Call  \t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl(['/', '/test', 'test'])\t| http://localhost:9778/,http://localhost:9778/test,http://localhost:9778/test\t|\n| @getBlock('styles').add(@getUrl(@site.styles)).toHTML() | \u0026lt;link  rel=\u0026quot;stylesheet\u0026quot; href=\u0026quot;http://localhost:9778/root_style.css\u0026quot; /\u0026gt;\u0026lt;link  rel=\u0026quot;stylesheet\u0026quot; href=\u0026quot;http://localhost:9778/sub_style.css\u0026quot; /\u0026gt; |\n\n### Arrays of objects\n| Call  \t\t\t\t\t\t\t\t\t| Returned\t\t\t\t\t\t\t|\n| ---\t\t\t\t\t\t\t\t\t\t| ---\t\t\t\t\t\t\t\t|\n| @getUrl(@getCollection('documents'))\t| http://localhost:9778/sub/documents.md,http://localhost:9778/document.md |\n\n\n## License\nLicensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)\n\u003cbr/\u003eCopyright \u0026copy; 2013+ J. Harshbarger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypercubed%2Fdocpad-plugin-geturl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypercubed%2Fdocpad-plugin-geturl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypercubed%2Fdocpad-plugin-geturl/lists"}