{"action":"closed","issue":{"url":"https://api.github.com/repos/EvanAgee/vuejs-wordpress-theme-starter/issues/24","repository_url":"https://api.github.com/repos/EvanAgee/vuejs-wordpress-theme-starter","labels_url":"https://api.github.com/repos/EvanAgee/vuejs-wordpress-theme-starter/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/EvanAgee/vuejs-wordpress-theme-starter/issues/24/comments","events_url":"https://api.github.com/repos/EvanAgee/vuejs-wordpress-theme-starter/issues/24/events","html_url":"https://github.com/EvanAgee/vuejs-wordpress-theme-starter/issues/24","id":331733474,"node_id":"MDU6SXNzdWUzMzE3MzM0NzQ=","number":24,"title":"Routing when in sub-directory","user":{"login":"fabiangeier","id":16634450,"node_id":"MDQ6VXNlcjE2NjM0NDUw","avatar_url":"https://avatars0.githubusercontent.com/u/16634450?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiangeier","html_url":"https://github.com/fabiangeier","followers_url":"https://api.github.com/users/fabiangeier/followers","following_url":"https://api.github.com/users/fabiangeier/following{/other_user}","gists_url":"https://api.github.com/users/fabiangeier/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiangeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiangeier/subscriptions","organizations_url":"https://api.github.com/users/fabiangeier/orgs","repos_url":"https://api.github.com/users/fabiangeier/repos","events_url":"https://api.github.com/users/fabiangeier/events{/privacy}","received_events_url":"https://api.github.com/users/fabiangeier/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-12T20:05:03Z","updated_at":"2018-06-13T05:17:26Z","closed_at":"2018-06-13T05:17:26Z","author_association":"NONE","body":"Hi Evan,\r\nfirst of all thanks for the good work!\r\n\r\nI am new to vue so I got a little issue when I try serving the application from a subdirectory.\r\nThe home url is http://localhost/projects/fabiangeierblog/.\r\n\r\nThe header and footer are shown but inside `<router-view></router-view>` Home.vue is not displayed.\r\n\r\nThis is my .htaccess File in _C:\\xampp\\htdocs\\projects\\fabiangeierblog_:\r\n```\r\n# BEGIN WordPress\r\n<IfModule mod_rewrite.c>\r\nRewriteEngine On\r\nRewriteBase /projects/fabiangeierblog/\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . /projects/fabiangeierblog/index.php [L]\r\n</IfModule>\r\n# END WordPress\r\n```\r\n\r\nAnd this is my approach solving the problem in the router/index.js _(C:\\xampp\\htdocs\\projects\\fabiangeierblog\\wp-content\\themes\\fabiangeierblog)_\r\n\r\n```\r\nimport Vue from 'vue'\r\nimport Router from 'vue-router'\r\n\r\n// Components\r\nimport Home from '../components/Home'\r\n\r\nVue.use(Router)\r\n\r\nconst router = new Router({\r\n  routes: [\r\n    {\r\n      path: '/',\r\n      name: 'Home',\r\n      component: Home,\r\n      // props: { pageContentID: 383 }\r\n    }\r\n  ],\r\n  base: \"/projects/fabiangeierblog/\",\r\n  mode: 'history',\r\n  scrollBehavior (to, from, savedPosition) {\r\n    if (savedPosition) {\r\n      return savedPosition\r\n    } else {\r\n      return { x: 0, y: 0 }\r\n    }\r\n  }\r\n})\r\n\r\nexport default router\r\n```\r\n\r\nThanks for the help and the good work you are doing.\r\n\r\nFabian"}}
{"actor":{"display_login":"fabiangeier"}}