• 综合主站
  • 用R语言的blogdown+hugo+netlify+github建博客

Biangbiang
换个能连接github的网络环境再试试
要么就手动装个hugo,不过在windows下配置起来比较麻烦

    24 天 后

    打开:File -> New Project -> New Directory -> Website using blogdown

    这步的时候,点击 New Directory 没有Website using blogdown
    选项是什么情况,谢谢

      tctcab
      谢谢,确实是这个问题,但是后续 Site deploy failed,Error running command: Build script returned non-zero exit code: 255,按照这个帖子https://d.cosx.org/d/419791-blogdown-netlify-non-zero-exist-code-255,设置HUGO_VERSION 为0.42.1(我电脑hugo的版本)也不对,请问这个是为什么

        2 个月 后

        Biangbiang 请问你的问题怎么解决的呀,我这好像和你是一回事

        blogdown::install_hugo()
        Error in file(con, "r") : cannot open the connection
        In addition: Warning message:
        In file(con, "r") : InternetOpenUrl failed: '安全频道支持出错'

        4 天 后

        xiaobaijiang 我出现了同样的问题,现在已经解决了。
        要在netlify的Advanced Build Settings 里面改,key那里填写HUGO_VERSION,version那里写你hugo的版本,比如我是0.48
        我是在rstudio管理git那里一直搞不定。下次建议大家发帖子的时候,把自己的环境/版本号什么的写清楚,否则推广性就受影响了。

        我已经搬回良心云了,neylify的帖子没办法往微信上转。
        费了一上午搞定了flask环境下的动态网页和hugo的静态网页并存,可以看下效果:http://www.smartxt.cn/

        7 天 后

        1.rstudio点击 Build website 后出现这个错误,是hugo运行的问题吗?

        ==> rmarkdown::render_site(encoding = 'UTF-8')

        Rendering content/post/2015-07-23-r-rmarkdown.Rmd
        Error: While parsing config: (36, 1): unexpected token
        Error: While parsing config: (36, 1): unexpected token
        'C:\Users\allen\AppData\Roaming\Hugo\hugo.exe" -d "public' �����ڲ����ⲿ���Ҳ���ǿ����еij���
        ���������ļ���
        Error in shell(cmd, mustWork = TRUE, intern = intern) :
        '"C:\Users\allen\AppData\Roaming\Hugo\hugo.exe" -d "public" -t hugo-ivy' execution failed with error code 1
        Calls: <Anonymous> ... hugo_build -> hugo_cmd -> system2 -> shell2 -> shell

        2.执行 blogdown:::serve_site() 这样的提示
        Error: While parsing config: (36, 1): unexpected token
        Error: While parsing config: (36, 1): unexpected token
        系统找不到指定的路径。
        Error in shell(cmd, mustWork = TRUE, intern = intern) :
        '"hugo" -b / -D -F -d "public" -t hugo-ivy' execution failed with error code 1

        一下午,还是没解决了~~~

          6 个月 后
          貌似不需要netfily,直接用username.github.io主页也能访问,好像是把hugo生成的public文件push到对应的repo里?

          这几天在网上看了很多教程,一直没成功。

          希望高人指点!

            dapengde 感谢回复,已成功用github page搭建

            后来看了yihui兄blogdown里的介绍后,还是转hugo+netlify了

            不过我觉得在R里面写markdown还不是很方便,个人目前用typora

            写完用GitHub Desktop同步

            netlify 唯一的问题是被微信屏蔽了,想给微信好友分享个 netlify 的链接都不行。 github.io 不存在这个问题。所以最好是双管齐下。

            当然,现在不存在不等于将来不存在;屏不屏蔽,全看微信的心情。

            • GFW 回复了此帖

              dapengde 恩,是的。

              不过目前对我来讲,netlify还是基于HUGO较便捷的部署方式。
              如果有分享的需求,到时候再去弄个域名 🙂

              话说最近在搜索如何在markdown中插入excel表格的问题时搜到了大鹏老师推荐typora的文章。
              我的第一个markdown软件就是typora,这里想请教一下大鹏老师,在用markdown(typora)插入带合并单元格的表格时的解决方案是什么?

              我目前找到的方式就是转换成html后添加colspan=""或者rowspan=""属性。
              如果有大量的表格的时候就显得比较麻烦,我目前考虑直接用图的形式添加。

              不知道大鹏老师在平时使用中是否有碰到这个问题,若有,是如何解决的。

              期待老师的回复!

                GFW 据我所知,typora 目前并没有解决合并单元格的良好方案。然而 R markdown 有。比如,gt 包

                • GFW 回复了此帖