Settings

Theme

Show HN: Simple-blogger – blog generated from GitHub project READMEs

github.com

52 points by depthfirst 6 years ago · 19 comments

Reader

pcr910303 6 years ago

This is... at best not favorable for a lot of static blogs.

For people who didn't understand what this is doing - it's using client-side JS to load the markdown files from GitHub, compiling it to HTML and displaying it on the browser.

Looks like the advantage of this is that it's a one-time setup - you don't need to build the files every time you commit, you can add your markdown files on GitHub and it automatically gets 'added' to your blog.

The downside of this is that this makes RSS feeds impossible, and non-JS users will suffer.

  • nindalf 6 years ago

    > you don’t need to build the files every time you commit.

    Is this a big advantage? I write an article in markdown and push to my server. The server’s post-commit hook automatically runs a static site generator. It takes less than a second to run each time. It took me half an hour to set this up[1], https included.

    Importantly, since it’s a static site with no client side JS, it’s faster and better for SEO. Anecdotal evidence - my blog is a featured snippet from google for a couple of tech related queries. This wasn’t the case earlier when my blog was generated by ghost.

    [1] - https://blog.nindalf.com/posts/setting-up-this-blog/

    • depthfirstOP 6 years ago

      Thanks for pointing out SEO use case; I hadn't thought of it.

      To reiterate my use case:

      - no maintenance: the site is served from github, so dont have to maintain/pay for a server

      - deduplication of work: dont have to write/sync a blog post and a project README for a given project.

      Regarding SEO, since all content in on github, a search engine might index github content and make it discoverable that way.

    • johnonolan 6 years ago

      Whether you choose to use clientside JS isn't related to any platform. Lots of people conflate this. They build ostensibly a totally empty scaffold site with an SSG and say "look how fast it is" - but the truth is if you built that same site with really any platform in the world, it would be just as fast.

      Ghost doesnt require any clientside JS of any kind, it's totally user choice if/when they want to have that. Yesterday I built a Ghost theme with 2.5kb page size, and average pageload of 100ms. Super easy :)

      • nindalf 6 years ago

        The speed comparison between my blog on Ghost and my blog on Hugo (an SSG) indicated that it is faster on Hugo. Note that I’m comparing time taken to serve the website, not time taken to generate files.

        The same content with the same URLs is ranked higher by Google after the switch, suggesting that Google prefers this.

  • depthfirstOP 6 years ago

    Thats correct; thanks for summarizing. I (the author) was mainly aiming for the one-time setup.

  • speedgoose 6 years ago

    Are non-js users a thing? I feel like no non technical user disables javascript and the few who do can enable it again if required.

    • bArray 6 years ago

      > Are non-js users a thing?

      We exist! Speaking for myself, it's a speed and privacy thing.

      > I feel like no non technical user disables javascript and

      > the few who do can enable it again if required.

      Generally I'm not going to enable JS just to use your blog, especially as doing so usually allows a tonne of tracking scripts to run.

      Also there is something extremely backwards about forcing every user to translate your content rather than you doing this and serving it statically. Think about the collective energy wastage if every website did this.

      • speedgoose 6 years ago

        Yes I know you do. I also disable JavaScript by default on my mobile. But we are on Hacker News, we don't represent the average user.

        • bArray 6 years ago

          Well, also remember that a tonne of internet is using a very low-bandwidth connection (sometimes much less than dial-up speeds). I imagine that without no-script installed a bunch of the web simply can't be used.

        • ulisesrmzroche 6 years ago

          Even within HN, yall are a very small faction.

          Truth is people actually like JS, without it, I bet they wouldn’t even use computers

    • maelito 6 years ago

      Non-js users can read the content in GitHub

captn3m0 6 years ago

I do this for automatically generating pages on my personal website for various projects via Jekyll.

So https://captnemo.in/ideas/ loads the README from https://github.com/captn3m0/ideas.

If you'd like to replicate, use this layout[0], and create a post with just a few bits of frontmatter[1]

The obvious advantage is that I can now serve READMEs for various projects within my website, without having to worry about updating it in any way. The READMEs stay in their respective projects. Its all done client side though, so not recommended if you'd like to use the page on your website as the primary. The one issue is that internal links in markdown don't work easily.

[0]: https://github.com/captn3m0/captn3m0.github.com/blob/master/...

[1]: https://github.com/captn3m0/captn3m0.github.com/blob/master/...

kfk 6 years ago

I have created something similar. I have a content folder with articles and auto generate content on my site at each commit. I built it as a Docker container and I run it on Nomad. It’s interesting how much content (crm?) we can put together by scraping other apps we use (github, hacker news, reddit, etc)

frequentnapper 6 years ago

this functionality has already been available as part of github pages. Not really sure what you are adding here.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection