简体   繁体   English

Raspberry上的Jekyll GitHub页面

[英]Jekyll GitHub page on Raspberry

Recently I have set up the (Beautiful) Jekyll on GitHub.io and made it available on my own domain. 最近,我在GitHub.io上设置了(Beautiful)Jekyll,并使其在我自己的域中可用。 But I was thinking if there is a way how to avoid GitHub.io and create own Git on Raspberry Pi (Raspbian) and connect it with RStudio for changing the blog. 但是我在想是否有办法避免GitHub.io并在Raspberry Pi(Raspbian)上创建自己的Git,并将其与RStudio连接以更改博客。 I found article that is cloning the GitHub.io repo and then pushing it live but making the changes to the blog is not very user friendly though. 我发现有一篇文章正在克隆GitHub.io存储库,然后将其实时发布,但是对博客进行更改并不是非常用户友好。 I have also found this but not sure if it's possible to expose it online and then pull the jekyll page from my domain (like CNAME and dns config on domain in case of GitHub.io). 我也发现了这一点,但不确定是否可以在线公开它,然后从我的域中拉出jekyll页面(例如,如果是GitHub.io,则是域中的CNAME和dns config)。

Final solution should work similar to this: change the Jekyll blog in RStudio (saved on laptop / cloned the current version from Rasp git) -> push the change to GitHub on Raspberry (and most recent version is exposed to domain as in case of GitHub.io). 最终解决方案应类似于此:在RStudio中更改Jekyll博客(保存在笔记本电脑上/从Rasp git克隆当前版本)->将更改推送到Raspberry上的GitHub(最新版本在GitHub的情况下公开给域.IO)。 Any ideas or experience on this? 有什么想法或经验吗?

If you want to use Github for hosting, you should use it for your repo too. 如果您想使用Github进行托管,则也应将其用于存储库。 I see no gain in using a Raspberry Pi as your own Git. 我认为将Raspberry Pi用作自己的Git没有任何好处。 So pull the git repo from Github to your laptop. 因此,将git repo从Github拉到您的笔记本电脑。 Edit the markdown (in RStudio if you want) and push it back to Github. 编辑降价(如果需要,可以在RStudio中),然后将其推回Github。 Simple. 简单。

UPDATE: If you do not want use Github you might as well forget about Git too. 更新:如果您不想使用Github,您也可能会忘记Git。 First, install apache2 on your Raspberri Pi to make it a web server. 首先, 在Raspberri Pi上安装apache2使其成为Web服务器。 Then, connect the domainname. 然后,连接域名。 Configure the vhost to point to the domain name and configure the DNS settings to point to your Raspberri Pi (I guess this requires a fixed IP). 配置虚拟主机以指向域名,并配置DNS设置以指向Raspberri Pi(我想这需要固定IP)。 Finally, run Jekyll on your laptop and build the site. 最后,在笔记本电脑上运行Jekyll并构建站点。 After building you should upload the '_site' folder to the Raspberri Pi in the public_html directory. 构建完成后,应将“ _site”文件夹上载到public_html目录中的Raspberri Pi。 That should do the trick. 这应该够了吧。

I would NOT recommend this last approach as it seems overly complicated. 我不建议使用这最后一种方法,因为它似乎过于复杂。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM