{"action":"created","issue":{"url":"https://api.github.com/repos/storybooks/storybook/issues/1900","repository_url":"https://api.github.com/repos/storybooks/storybook","labels_url":"https://api.github.com/repos/storybooks/storybook/issues/1900/labels{/name}","comments_url":"https://api.github.com/repos/storybooks/storybook/issues/1900/comments","events_url":"https://api.github.com/repos/storybooks/storybook/issues/1900/events","html_url":"https://github.com/storybooks/storybook/issues/1900","id":261048515,"number":1900,"title":"Unable to load fonts (returning 404)","user":{"login":"njj","id":1734769,"avatar_url":"https://avatars3.githubusercontent.com/u/1734769?v=4","gravatar_id":"","url":"https://api.github.com/users/njj","html_url":"https://github.com/njj","followers_url":"https://api.github.com/users/njj/followers","following_url":"https://api.github.com/users/njj/following{/other_user}","gists_url":"https://api.github.com/users/njj/gists{/gist_id}","starred_url":"https://api.github.com/users/njj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njj/subscriptions","organizations_url":"https://api.github.com/users/njj/orgs","repos_url":"https://api.github.com/users/njj/repos","events_url":"https://api.github.com/users/njj/events{/privacy}","received_events_url":"https://api.github.com/users/njj/received_events","type":"User","site_admin":false},"labels":[{"id":343576459,"url":"https://api.github.com/repos/storybooks/storybook/labels/question%20/%20support","name":"question / support","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-27T17:00:04Z","updated_at":"2017-09-28T10:07:02Z","closed_at":null,"author_association":"NONE","body":"Hi all, I've tried various approaches to getting my fonts to load, all which have failed.\r\n\r\nThe main application is routed through nginx, so I use the paths related to that i.e. `web-2` in the less files for loading the fonts:\r\n\r\nI am using the `-s` flag when running storybook to point at `./assets/`\r\n\r\nWhen loading the fonts, the less file looks something like:\r\n\r\n```css\r\n@font-face{\r\nfont-family:\"Avenir-Roman\";\r\nsrc:url(\"/web-2/assets/fonts/avenir/57bf7902-79ee-4b31-a327-1bbf59a3d155.eot?#iefix\");\r\nsrc:url(\"/web-2/assets/fonts/avenir/57bf7902-79ee-4b31-a327-1bbf59a3d155.eot?#iefix\") format(\"eot\"),url(\"/web-2/assets/fonts/avenir/b290e775-e0f9-4980-914b-a4c32a5e3e36.woff2\") format(\"woff2\"),url(\"/web-2/assets/fonts/avenir/4b978f72-bb48-46c3-909a-2a8cd2f8819c.woff\") format(\"woff\"),url(\"/web-2/assets/fonts/avenir/9bdf0737-f98c-477a-9365-ffc41b9d1285.ttf\") format(\"truetype\"),url(\"/web-2/assets/fonts/avenir/15281d0d-e3c2-46e1-94db-cb681e00bfaa.svg#15281d0d-e3c2-46e1-94db-cb681e00bfaa\") format(\"svg\");\r\n}\r\n```\r\n\r\nThe console error I get is something similar to:\r\n\r\n```log\r\n http://localhost:6006/web-2/assets/fonts/avenir/d513e15e-8f35-4129-ad05-481815e52625.woff2\r\n```\r\n\r\nDoes anyone have any advice on how to get these to load properly? "},"comment":{"url":"https://api.github.com/repos/storybooks/storybook/issues/comments/332790854","html_url":"https://github.com/storybooks/storybook/issues/1900#issuecomment-332790854","issue_url":"https://api.github.com/repos/storybooks/storybook/issues/1900","id":332790854,"user":{"login":"shilman","id":488689,"avatar_url":"https://avatars2.githubusercontent.com/u/488689?v=4","gravatar_id":"","url":"https://api.github.com/users/shilman","html_url":"https://github.com/shilman","followers_url":"https://api.github.com/users/shilman/followers","following_url":"https://api.github.com/users/shilman/following{/other_user}","gists_url":"https://api.github.com/users/shilman/gists{/gist_id}","starred_url":"https://api.github.com/users/shilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shilman/subscriptions","organizations_url":"https://api.github.com/users/shilman/orgs","repos_url":"https://api.github.com/users/shilman/repos","events_url":"https://api.github.com/users/shilman/events{/privacy}","received_events_url":"https://api.github.com/users/shilman/received_events","type":"User","site_admin":false},"created_at":"2017-09-28T10:07:02Z","updated_at":"2017-09-28T10:07:02Z","author_association":"OWNER","body":"@njj When you run `start-storybook` it is running its own webserver, and when you run the `-p 6006 -s somedir` option it serves files under `somedir` in the root path. For example, if `somedir` contains `a.txt` and `b.txt`, those should show up at `http://localhost:6006/a.txt` and `http://localhost:6006/b.txt`.\r\n\r\nIn your case, everything under the assets directory should show up at the root, e.g. `/fonts/avenir/...` so you should be referencing that URL, not the one in your example above."}}
{"actor":{"display_login":"shilman"}}