GithubHelp home page GithubHelp logo

Comments (3)

viko16 avatar viko16 commented on June 20, 2024

@luckypoem 你的 conf.json 没有写错,是 posts/test-1.md 这篇文章的标题不对,导致在列表中提取不出日期来,可以参考其他文章的文件名格式

from vue-ghpages-blog.

luckypoem avatar luckypoem commented on June 20, 2024

现在搞好了:http://vgb.bright.biz.st ,不过有个匪夷所思的问题,就是http://vgb.bright.biz.st 页面里的帖子我只能直接点击,才打得开。如果我在选择在新开的页面中打开,会显示: not found. 复制某个帖子的链接地址,在新开的浏览器tab里,访问也是打不开的,也显示:not found. 比如这个帖子:
http://vgb.bright.biz.st/post/5b76ed01804907271cfb73afb26c9abc7598d94f ,我估计你直接访问它,也是打不开的。
怎么解决?

from vue-ghpages-blog.

viko16 avatar viko16 commented on June 20, 2024

这是因为开启了 vue-router 的 history 模式。

解决方法

A. 如果你能配置服务器
修改一下你的服务器配置(看了一下你的网站响应头是 Apache)

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

B. 如果不能
那就简单地将 router/index.js 里面把 mode: 'history' 改成 mode: 'hash'

详细说明

http://router.vuejs.org/zh-cn/essentials/history-mode.html

from vue-ghpages-blog.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.