TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Benefits of a Git-backed Blog

33 点作者 jankins大约 13 年前

10 条评论

antonyme大约 13 年前
I'm just about to switch over from MovableType to GitHub Pages <a href="http://pages.github.com/" rel="nofollow">http://pages.github.com/</a> . They use Jekyll <a href="http://jekyllrb.com/" rel="nofollow">http://jekyllrb.com/</a> to publish text, HTML or Markdown. So far it's pretty awesome.<p>The benefits of this particular setup include:<p>* all articles are under version control<p>* just do a `push` to publish<p>* easily run a local Jekyll server to preview articles<p>* use a real programmer's text editor (not some web form)<p>* Markdown is the best for tech articles<p>* write, preview and commit while offline<p>* code syntax highlighting<p>* integration of snippets (gists)<p>* variable layouts for different page types<p>* pages are static so are served fast<p>* easy to add comments with Disqus et al<p>* easily port your content anywhere<p>* keep images and other binary content alongside text<p>Which reminds me - dear $DEITY, when is HN going to support Markdown?!
评论 #3671271 未加载
评论 #3671099 未加载
pilif大约 13 年前
There is a simple rule of thumb about unix tools: when you are in need of a -f or --force parameter, most likely something is wrong and you should rethink what you are doing.<p>Even more so if the tool in question refuses to do anything unless -f is given.<p>That said, I'm glad to see that the OP took this as a learning experience and not as a reason for posting a long-winded rant about why git should be considered harmful
评论 #3670702 未加载
emillon大约 13 年前
&#62; I started to get a feeling this wasn't right, and so I googled around for a way to undo the add.<p>At that moment, the easiest way would have been to "rm -r .git". As git stores all its metadata in that hidden directory, this is a safe way to undo the creation of a repository.
alexchamberlain大约 13 年前
Sorry, but you didn'tblist any benefits, other than teaching you git. What about versioning your articles, distributed backups etc?
rcthompson大约 13 年前
I wonder if this was posted more for the "how I blew away my home directory with git" anecdote than anything else.
beothorn大约 13 年前
I'm beggining a github blog using jekyll. If anyone is interested, it is still a very basic and easy to understand setup. Also, I wrote a little script to write posts from the command line: <a href="https://github.com/beothorn/beothorn.github.com/blob/master/newJekyllPost" rel="nofollow">https://github.com/beothorn/beothorn.github.com/blob/master/...</a> Just change vim to your favorite editor.
karl_freeman大约 13 年前
On a slightly related note. If anyone is thinking of moving over to Git / Git(hub) backed blogging. Don't count out Github's 'Edit File' ( <a href="http://ace.ajax.org/" rel="nofollow">http://ace.ajax.org/</a> ) editor online as I constantly find myself amending typo's, etc... Was for sure an added bonus.
EnderMB大约 13 年前
Perhaps a bit off-topic, but isn't the use of post-receive hooks to publish your content effectively hacking Git to do something that it shouldn't?<p>For me, the ideal approach was always to use continuous integration to publish/build my site fresh every time I commit.
评论 #3671468 未加载
drivebyacct2大约 13 年前
Title says: "Benefits of a Git-backed Blog"<p>Blogpost describes: "Deleting all my files with git"<p>Conspicuously Missing: "Benefits of a Git-backed Blog"
评论 #3670777 未加载
评论 #3670672 未加载
shearn89大约 13 年前
* goes to read post *<p>* comments on it on the blog *<p>* comes to HN and discovers people have already made my comments in the comment thread *<p>Great minds...