fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.52k stars 273 forks source link

你好,我在用archer主题的时候,发现写好的一些文章,在本地无法加载,不知道是不是CSS的问题,我查了网页的源码,html是存在的。但是我将它deploy之后,在github上又能加载出来,想知道这是为什么,冒昧打扰,还请海涵。 #150

Closed Vincent-Hoo closed 6 years ago

Vincent-Hoo commented 6 years ago

「描述遇到的问题」或「发现的 bug」(Describe the problem or bug you encounter)

你是否已经阅读过以下内容,并确认你的行为是正确的,在 [ ] 中填入 x 选中(Ensure that you had consulted followings and confirm the validity of your operation, fill x in [ ] to select)

如何复现(To Reproduce)

存在问题或 bug 的已部署上线的页面地址(A deployed page link that with bug or problem)

如果可能是与 markdown 内容相关的问题或 bug,请粘贴对应的 markdown 内容(If the problem or bug that may be related to markdown, paste it here)

打开控制台,填写控制台中打印的主题的版本,如果脚本出错可直接提供控制台截图(Open the console and report the version of hexo-theme-archer. You can paste the screenshot on console directly if there is error with script)

信息 (please complete the following information):

其他信息(Additional context)

fi3ework commented 6 years ago

你好,你说的本地打开是指的在 public 文件夹中直接打开吗。因为 html 中资源的路径都是相对于你 hexo 配置中的 root,所以要看的话要起一个静态资源服务器看。 其实 hexo 已经提供了这个功能,用 hexo s 就可以开启 hexo 的预览。

Vincent-Hoo commented 6 years ago

感谢你的回复,我用hexo server命令在本地看,主页是没有问题的,但是我打开我的某一篇文章,就会发现加载不出来,其他文章都能加载出来。具体情况是下面这张图片这样。其实我试过其他的theme,发现这篇文章也是加载不出来。我就发现很奇怪,不知道你能否解答我的问题,谢谢你! [cid:image002.png@01D433C3.8E9F4970]

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用


发件人: Wee notifications@github.com 发送时间: Tuesday, August 14, 2018 11:36:16 AM 收件人: fi3ework/hexo-theme-archer 抄送: Vincent-Hoo; Author 主题: Re: [fi3ework/hexo-theme-archer] 你好,我在用archer主题的时候,发现写好的一些文章,在本地无法加载,不知道是不是CSS的问题,我查了网页的源码,html是存在的。但是我将它deploy之后,在github上又能加载出来,想知道这是为什么,冒昧打扰,还请海涵。 (#150)

你好,你说的本地打开是指的在 public 文件夹中直接打开吗。因为 html 中资源的路径都是相对于你 hexo 配置中的 root,所以要看的话要起一个静态资源服务器看。 其实 hexo 已经提供了这个功能,用 hexo s 就可以开启 hexo 的预览。

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fi3ework/hexo-theme-archer/issues/150#issuecomment-412744285, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfGN01Hnsu8ay2jk2LZHqNUB2njAKN8gks5uQkWwgaJpZM4V7ujF.

fi3ework commented 6 years ago

额,图挂了

Vincent-Hoo commented 6 years ago

是图片的问题?

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用


发件人: Wee notifications@github.com 发送时间: Tuesday, August 14, 2018 11:41:44 AM 收件人: fi3ework/hexo-theme-archer 抄送: Vincent-Hoo; Author 主题: Re: [fi3ework/hexo-theme-archer] 你好,我在用archer主题的时候,发现写好的一些文章,在本地无法加载,不知道是不是CSS的问题,我查了网页的源码,html是存在的。但是我将它deploy之后,在github上又能加载出来,想知道这是为什么,冒昧打扰,还请海涵。 (#150)

额,图挂了

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fi3ework/hexo-theme-archer/issues/150#issuecomment-412745075, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfGN04dGhUVohzizxNi_a8K3plC3NxAtks5uQkb4gaJpZM4V7ujF.

fi3ework commented 6 years ago

你刚才的回复中的图挂了

Vincent-Hoo commented 6 years ago

噢不好意思,我再发一下,你看能不能看到。[cid:image001.png@01D433C4.999125A0]

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用


发件人: Wee notifications@github.com 发送时间: Tuesday, August 14, 2018 11:45:28 AM 收件人: fi3ework/hexo-theme-archer 抄送: Vincent-Hoo; Author 主题: Re: [fi3ework/hexo-theme-archer] 你好,我在用archer主题的时候,发现写好的一些文章,在本地无法加载,不知道是不是CSS的问题,我查了网页的源码,html是存在的。但是我将它deploy之后,在github上又能加载出来,想知道这是为什么,冒昧打扰,还请海涵。 (#150)

你刚才的回复中的图挂了

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fi3ework/hexo-theme-archer/issues/150#issuecomment-412745635, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfGN0wIQuKWi2Um59QuEqV7kuF1OfVMRks5uQkfYgaJpZM4V7ujF.

fi3ework commented 6 years ago

不能。。

Vincent-Hoo commented 6 years ago

我把它放在附件里面了呀,没有吗?或者能否加下你微信?

Vincent Ho School of data and computer science, Sun-Yat-sen University, China

Tel: 15626120921


发件人: Wee notifications@github.com 发送时间: 2018年8月14日 12:34:36 收件人: fi3ework/hexo-theme-archer 抄送: Vincent-Hoo; Author 主题: Re: [fi3ework/hexo-theme-archer] 你好,我在用archer主题的时候,发现写好的一些文章,在本地无法加载,不知道是不是CSS的问题,我查了网页的源码,html是存在的。但是我将它deploy之后,在github上又能加载出来,想知道这是为什么,冒昧打扰,还请海涵。 (#150)

不能。。

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/fi3ework/hexo-theme-archer/issues/150#issuecomment-412751973, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfGN0yatiKiaLnFTGRtUIommYceF81Icks5uQlNcgaJpZM4V7ujF.

fi3ework commented 6 years ago

尽量在 issue 回复吧,这样其他人也能看见相同的问题。 在 github 的页面下回复就可以正常贴图了。

Vincent-Hoo commented 6 years ago

dd

Vincent-Hoo commented 6 years ago

不好意思我一直都在邮箱那里回复你,上面那个图就是本地上打开一篇文章之后,加载不出来的图。但是我deploy到我的github上,远端的网页是可以显示的,你可以看下我的主页Vincent-Hoo.github.io

fi3ework commented 6 years ago

如果其他 theme 也无法加载出来,那就是与主题无关了。 把整篇 md 帖一下吧,因为不是主题的问题,所以我也不确定问题在哪。

Vincent-Hoo commented 6 years ago

title: 用hexo搭建个人网站 date: 2018-08-14 10:08:29 tags:

hexo介绍

hexo是基于Git和Node.js的静态网站搭建框架,通过hexo命令可以自动生成静态网站的html和css,然后可以将其部署于服务器,生成个人网站。 {% asset_img hexo_homepage.png hexo主页 %}

hexo本地安装与运行

  1. 安装Git和Node.js: 由于hexo是基于Git和Node.js的,所以在安装hexo之前,需要先安装GitNode.js.

  2. 安装hexo:输入下面这条语句,就会自动地安装hexo。

    $ npm install hexo-cli -g
  3. 初始化blog: 输入下面这些语句,hexo会自动从网上拷贝所需要的dependency和package,生成一个project,存储在Vincent-Hoo.github.io这个文件夹里面,Vincent-Hoo.github.io是博客的名字,可以取其它的名字,但是由于我之后要部署到Github上,所以就取这个名字。

    $ hexo init Vincent-Hoo.github.io
    $ cd Vincent-Hoo.github.io
    $ npm install
  4. 在本地运行blog:输入以下的命令,hexo会自动生成一个静态网站在http://localhost:4000。

    $ hexo server

    当目前为止,hexo已经为我们搭建好了一个个人的博客,里面有最基本的功能,如博客发表,搜索,导航,分享等。Hello World是hexo初始化时候自动生成的第一篇博客。 {% asset_img hexo网站初始化的样子.jpg 600 300 %}

hexo框架的基本结构

在你的hexo project初始化完之后,project文件夹的目录结构如下。

{% codeblock %} |----- node_modules |----- scaffolds |----- source | |----- _posts | |----- _drafts |----- themes |----- _config.yml |----- db.json |----- package.json {% endcodeblock %}

scaffolds

首先,hexo支持三种layout

而scaffolds里面有三个文件,jdfkjdkfjdl记分卡的解放路的借款方

Vincent-Hoo commented 6 years ago

最奇怪的是,本地加载不出来,远端的网站可以。还有就是,当我删掉最后那一段话,它本地又能加载出来了,但是我也不觉得是markdown的问题,没理由加一句话,就会导致加载不出来。唉好晕0.0

fi3ework commented 6 years ago

这个还真看不出来有什么问题,可以给 hexo 提个 issue 问问。。。