search

Home  >  Q&A  >  body text

git - How to create static html without templates in hexo?

When I use hexo to write a blog, I create a folder demo in the source folder, and create a static file html in it.
But when I publish it, I cannot access this /demo/html. How should I create a static file in this case? What about html?

There is no demo folder in the public that generates the blog. I created the demo folder in public and it can be accessed.
But the demo folder is ignored by git and cannot be synchronized to github. Is there any way to solve it? ?

淡淡烟草味淡淡烟草味2811 days ago665

reply all(5)I'll reply

  • 黄舟

    黄舟2017-05-02 09:27:34

    Just put it in the source of themes. You can refer to the "Add README.md file or html file in the main directory" section of the article.

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:27:34

    I didn’t understand. Do you want to write the template yourself? ?

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:27:34

    The only solution I can think of is hexo g之后,把demo文件夹放到public下,然后hexo d, I didn’t think of any other solution.

    reply
    0
  • 迷茫

    迷茫2017-05-02 09:27:34

    Is it a problem with the configuration file? When I use hexo, other static files in the source are automatically copied to the public folder after hexo generate. Take a look at hexo’s documentation on this part.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:27:34

    at _config.yml文件中添加配置:skip_render: demo/**

    reply
    0
  • Cancelreply