Live data from Hacker News

Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

cdmedia.github.io

71–80 of 97 posts

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#71

Cool. I'm actually building something very similar @ http://evanplaice.com . I use Markdown/JSON for all of the content. Markdown files can easily be embedded in a page using the directive I wrote. The source is @ http://github.com/evanplaice/evanplaice.com . I'm planning to eventually extract the good bits, and adapt it to work with Jekyll files. Front-matter support is the last major road block. Google shouldn't ha…

You should know that your page was blank for about 20 seconds. I nearly closed it.

Oh, it actually worked? I waited a couple seconds and closed it, assuming it was broken.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#72
post #2

Shameless self-promotion: For easy theming, I suggest you to take a look at the Classless Project, which will be super easy to integrate to in your case and will bring many already made themes with it -- and much more to come. The ursprung[2] micro CMS is integrating Classless with success to this day. [1]: https://github.com/websitesfortrello/classless [2]: https://github.com/onli/ursprung

Awesome collection. I'll have to find an excuse to use one of these now. The only thing I'd suggest is, use ES6 instead of CoffeeScript or provide an ES5 copy of the code.

There's no code, it's only a collection of themes based on a "standard" template.

The CoffeeScript code you see is for the bookmarklet used on the playground. It is old code, coded in a rush, most for proof-of-concept. I'm slowly rethinking this playground and theme development stuff, so this is going to be replaced.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#73
post #49
post #42

Earlier quoted context omitted.

> > an entirely blank page > That's only true if you use 'view source'. If you open up > dev tools, all of the elements are rendered in full and > live updated as they change. If one attempts to view the demo with client side javascript turned off - one gets a completely blank page. The very point to a static site generator is the word "static" which is generally taken to mean that the actual rendering of the content…

Even with js turned on, I get a mostly blank page. It chokes on String.prototype.endsWith, which is an ES6 feature not supported by my very-slightly-out-of-date version of Safari. If you want to render your blog in client side js AND use fresh-from-the-oven js features, the least you can do is include a polyfill.

Thanks for pointing this out. Going to be adding a polyfill for that!

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#74
post #42

Earlier quoted context omitted.

> an entirely blank page That's only true if you use 'view source'. If you open up dev tools, all of the elements are rendered in full and live updated as they change. Client-side rendered apps are quickly becoming every-where rendered apps. They can now work isomorphically, on the desktop, and on mobile. > every single visitor has to regenerate it on their machine This is a false premise. For server-side view render…

> > an entirely blank page > That's only true if you use 'view source'. If you open up > dev tools, all of the elements are rendered in full and > live updated as they change. If one attempts to view the demo with client side javascript turned off - one gets a completely blank page. The very point to a static site generator is the word "static" which is generally taken to mean that the actual rendering of the content…

Right, this is exactly why I'm avoiding using the word "static". I began by using that term but have strayed away from it for several reasons.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#75
post #63

Earlier quoted context omitted.

> They can now work isomorphically, on the desktop, and on > mobile. So can plain HTML. Without any needless scripting. > We're moving past the days of the static web. We are not. Maybe you are, we can wait till you come back. > Especially, now that it's trivial to pull data from many > different sources on the client-side. HTML is even more trivial.

HTML (or more specifically HTML+css, and how they interact with and render in the browser) are anything but trivial. javascript (the language, not the JIT) is relatively simple in contrast client side rendering + json apis on the server are the holy grail of openness (esp with an MIT licensed client)

Building a webpage node by node from within Javascript does not lessen the complexity of HTML and CSS, it simply adds to it. You're doing the exact same things - creating DOM nodes with attributes - but with yet another level (or 5) of indirection.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#76
post #64
post #54

Earlier quoted context omitted.

Many browser exploits that break out of the sandbox take advantage of javascript. Disabling it prevents entire classes of exploits. Also, a lot of ad networks use javascript as a tracking tool.

After about 20 seconds of googling chrome: https://www.cvedetails.com/cve/CVE-2011-1186/ firefox: https://www.cvedetails.com/cve/CVE-2015-4509/

I don't think most people would consider 2011 recent.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#77

i can't get it to run. it's cloned to danielovich.github.io but then it breaks! :/

Make sure your config has your Github username and repo name. Looks like it's blank according to the console.

updated that, still cannot get pages or posts to work.

bummer...

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#78
This looks interesting. I'm not in love with the name. That said, I love all static site generators. Unfortunately, hosting a static site isn't much fun, so I created http://www.statichosting.co to make it easier. It's in beta and we are getting close to launch, but have a few bugs to work out. Would love to have anyone give feedback on it as it develops.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#79

Earlier quoted context omitted.

Make sure your config has your Github username and repo name. Looks like it's blank according to the console.

updated that, still cannot get pages or posts to work. bummer...

ohhh I see what's going on here. since you cloned the demo, you need to use postsFolder: 'demo/posts' and pagesFolder: 'demo/pages' since they are located inside the demo folder. The demo is setup slightly different than a standard setup since it's in the subfolder.

Re: Show HN: CMS.js – Fully Client-Side JavaScript Site Generator

#80

Cool. I'm actually building something very similar @ http://evanplaice.com . I use Markdown/JSON for all of the content. Markdown files can easily be embedded in a page using the directive I wrote. The source is @ http://github.com/evanplaice/evanplaice.com . I'm planning to eventually extract the good bits, and adapt it to work with Jekyll files. Front-matter support is the last major road block. Google shouldn't ha…

I see you are getting some negative feedback, haha. I think the main problem at this point isn't due client-rendering, but the large prerequisite files. Gzipping your JavaScript would trim a MB or more. Putting the static assets on a CDN (or enabling gzip yourself) would cut the render time by 2/3rds.

Semantic UI adds 700KBs of CSS, which seems like a lot more than your site should need. Even if this were a static rendered site, the browser would delay rendering anything until the CSS was downloaded.

Post reply on HN