{"action":"created","issue":{"url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/23","repository_url":"https://api.github.com/repos/Xzya/hugo-bootstrap","labels_url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/23/comments","events_url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/23/events","html_url":"https://github.com/Xzya/hugo-bootstrap/issues/23","id":379651628,"node_id":"MDU6SXNzdWUzNzk2NTE2Mjg=","number":23,"title":"[Question] How works links to static resources?","user":{"login":"iGormilhit","id":1557213,"node_id":"MDQ6VXNlcjE1NTcyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1557213?v=4","gravatar_id":"","url":"https://api.github.com/users/iGormilhit","html_url":"https://github.com/iGormilhit","followers_url":"https://api.github.com/users/iGormilhit/followers","following_url":"https://api.github.com/users/iGormilhit/following{/other_user}","gists_url":"https://api.github.com/users/iGormilhit/gists{/gist_id}","starred_url":"https://api.github.com/users/iGormilhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iGormilhit/subscriptions","organizations_url":"https://api.github.com/users/iGormilhit/orgs","repos_url":"https://api.github.com/users/iGormilhit/repos","events_url":"https://api.github.com/users/iGormilhit/events{/privacy}","received_events_url":"https://api.github.com/users/iGormilhit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-12T07:24:34Z","updated_at":"2018-11-12T09:57:56Z","closed_at":"2018-11-12T09:57:56Z","author_association":"NONE","body":"In the layouts files, I've seen that to build an URL to get the `css` or another static resource, the code is `{{ .SiteBaseURL }}css/style.css`, and that the file is in `static/css/style.css`.\r\n\r\nSo, I have a `static` folder in my hugo directory, with a sub folder `img` that contains my `logo.svg`. And in the `layouts/partials/brand.html`, I have this code: `<img src=\"{{ .Site.BaseURL }}img/logo.svg\" ...`, which works fine with `hugo server`.\r\n\r\nHowever, when trying to deploy through Netlify, the URL to `style.css` and `logo.svg` get a 404 error. The path are `https://[my-domain]/css/style.css` or `https://[my-domain]/img/logo.svg`.\r\n\r\nSo, I'm wondering how the resolution to the `static` directory works."},"comment":{"url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/comments/437821453","html_url":"https://github.com/Xzya/hugo-bootstrap/issues/23#issuecomment-437821453","issue_url":"https://api.github.com/repos/Xzya/hugo-bootstrap/issues/23","id":437821453,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzgyMTQ1Mw==","user":{"login":"iGormilhit","id":1557213,"node_id":"MDQ6VXNlcjE1NTcyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1557213?v=4","gravatar_id":"","url":"https://api.github.com/users/iGormilhit","html_url":"https://github.com/iGormilhit","followers_url":"https://api.github.com/users/iGormilhit/followers","following_url":"https://api.github.com/users/iGormilhit/following{/other_user}","gists_url":"https://api.github.com/users/iGormilhit/gists{/gist_id}","starred_url":"https://api.github.com/users/iGormilhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iGormilhit/subscriptions","organizations_url":"https://api.github.com/users/iGormilhit/orgs","repos_url":"https://api.github.com/users/iGormilhit/repos","events_url":"https://api.github.com/users/iGormilhit/events{/privacy}","received_events_url":"https://api.github.com/users/iGormilhit/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T09:57:56Z","updated_at":"2018-11-12T09:57:56Z","author_association":"NONE","body":"Ok, I got it, sorry for the noise.\r\n\r\nI was checking the build version on a Netlify *preview*, and so the base URL isn't the right one. I've change my `layouts/partials/brand.html` code to this: `<img src=\"{{ .Site.BaseURL | relURL }}img/logo.svg\" ...`, and the preview is now working as I expect."}}
{"actor":{"display_login":"iGormilhit"}}