{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/notes/issues/66","labels_url":"https://api.github.com/repos/ipfs/notes/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/notes/issues/66/comments","events_url":"https://api.github.com/repos/ipfs/notes/issues/66/events","html_url":"https://github.com/ipfs/notes/issues/66","id":111447602,"number":66,"title":"Case: Use IPFS to host a Blog (or similar type of website)","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-14T17:22:19Z","updated_at":"2015-10-15T23:25:54Z","closed_at":null,"body":"I'm specially interested in figure out a way (or ways) that we can start hosting Blog type of webpages on IPFS, without having to create a new framework for blogging, meaning that I'm focusing on statically generated blogs or blogs that compiled to a static generated version.\r\n\r\nEven though a statically generated blog is a static website, it has some extra challenges to the normal static webpage hosting, simply because of the expectations that we have from a blog nowadays, such as searching for post tags or blog posts by date.\r\n\r\nI'm writing this issue to put the ideas and discussions we've been having about it in one place, so that it also easier to see the progress.\r\n\r\nThese statically generated blog should be accessible and correctly rendered if loaded from a `ipfs.io/ipfs/hash`, `ipfs.io/ipns/hash` or `somedomain.com/`. It is important to this in mind, because the the fact that we might have some `basePath` means that loading assets (css, fonts, images) on a webpage through root path ('/'), becomes impossible. What this means is that we need a way to make the urls of the assets of a web page to be loaded through a path that is relative to itself ('../css' or '../../img/collection1' for eg).\r\n\r\n\r\nSome options:\r\n- precompile the whole blog\r\n  - use harp to compile the blog. Checking if it is possible if it can handle the resolving of the basePath https://github.com/kennethormandy/hb-casper/issues/3\r\n- have a native web app to do the blog generation\r\n  - make this native webapp be a IPFS hosted WebComponent that loads posts and styling from somewhere else\r\n  - make harp to be a browser app?\r\n- leverage the MerkleDAG to create a more interesting data structure for the blog\r\n  - https://github.com/ipfs/starlog\r\n\r\nSome more context:\r\n- https://github.com/ipfs/starlog/issues/31\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ipfs/notes/issues/comments/148550449","html_url":"https://github.com/ipfs/notes/issues/66#issuecomment-148550449","issue_url":"https://api.github.com/repos/ipfs/notes/issues/66","id":148550449,"user":{"login":"edrex","id":14615,"avatar_url":"https://avatars.githubusercontent.com/u/14615?v=3","gravatar_id":"","url":"https://api.github.com/users/edrex","html_url":"https://github.com/edrex","followers_url":"https://api.github.com/users/edrex/followers","following_url":"https://api.github.com/users/edrex/following{/other_user}","gists_url":"https://api.github.com/users/edrex/gists{/gist_id}","starred_url":"https://api.github.com/users/edrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edrex/subscriptions","organizations_url":"https://api.github.com/users/edrex/orgs","repos_url":"https://api.github.com/users/edrex/repos","events_url":"https://api.github.com/users/edrex/events{/privacy}","received_events_url":"https://api.github.com/users/edrex/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T23:25:54Z","updated_at":"2015-10-15T23:25:54Z","body":"The only way to allow serving the same site tree under each of `ipfs.io/ipfs/hash`, `ipfs.io/ipns/hash`, and `somedomain.com/` is to teach the build tool to use relative paths for all `<a>`,  `<link>`, `<style>`, `<script>`, etc tags. This includes post text if the text could be viewed at some other path such as an index page.\r\n\r\nSetting the [base tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) and using absolute paths each require knowing at publish time what the base path will be.\r\n\r\nI use Harp and I hit this when I set up the IPNS gateway proxy thing a couple of months ago. I'll report here if I find a way to do relative paths nicely with Harp. There are a ton of issues about that on the Harp tracker. Their tracker is plagued with duplicate support tickets which never close unfortunately."}}