Gridsome – A Vue.js static site generator
gridsome.org
gridsome.org
It’s my favourite development in web development in a long time.
I’m starting to feel like I want to use JS now for sites instead of just being forced to because of its power on the frontend. I hope the future is top heavy component based SSR with an API style backend which also runs off your web server.
With much simpler API requirements it’s easier to use languages like Rust and Haskell since the whole templating, view helpers, routing, layouts, asset management, and rendering stuff is all handled for you by the SSR app. Then you focus the backend on models, logic, authentication, and databases.
Shameless plug: I just wrote a guide to approach dynamic content on static sites a few days ago.
https://blog.hasura.io/approaches-to-add-dynamic-content-sta...
Admittedly it was more of a personal goal but it's definitely possible and I'm pretty sure nuxt isn't the reason for you not getting it over 50.
Ironically, the only pages where I can't get a 100 score is when I'm using google maps due to a "Does not use passive listeners to improve scrolling performance" rule.
Has it become any better? I'm pretty comfortable with Vue.js.
The documentation is certainly not as good as Vue. Which is a shame. I wish someone from their team talked to the documentation master over at Vue and made their documentation as good.
The only other criticism that I have, is that with Vue there are a lot of people over at discord. So if you can get stuck, you'll get some help. For Nuxt, you'll just get flat out ignored. Especially if you are developing on a Node JS framework no one is using.
I really wish there was more competition in this space. Happy Gridsome is stepping up and hopefully will be better in aspects compared to Nuxt.
That said, in a few weeks. Will build something with Gridsome and then I can have a better opinion.
You find out about the problem when pieces or the entire site are not working.
The CLI is actually pretty powerful and has some great configs out of the box that people think they need Nuxt for.
It makes my life a lot easier.
You can build your own static site generator in an afternoon. It's super simple to do and you avoid all the complexity of these off-the-shelf static site frameworks.
A few examples of my own:
* A blog made with makefile, m4, multimarkdown, and scss
* A personal website made with shell scripts and php
* A business website made with ruby, rake and erbYou can also leverage 3rd party libraries to do the heavy lifting of:
1) Reading local file tree (the IO/FS module of your $LANGUAGE standard lib will suffice)
2) Parsing front matter (parsing the YAML block of meta at the top of the Markdown file)
3) Transforming Markdown to HTML (plenty of good libraries)
4) Using HTML templates (also plenty to choose from)
I don't think it's appropriate to link to my site here but if you're interested, I wrote a blog post on how to build your own static site generator. Link is in the bio.
Not that that’s impossible, but I lacked the restraint to turn away and do what actually matters: write content.
Sounds like about the experience you'd have with most existing static site generators ;-)
Plus, because my rendering is all just pure JS functions, it'd be a flip of a switch to go from static site generator to an Express server that renders pages at request time.
I am still using it and built several sites with it, including image galleries for several weddings.
parcel build *.html --public-url https://yourdomain
Minifies all code and has sane defaults not to have to deal with configuration in most cases.In retrospect, I really should have just written my own.
Vue is a particularly good choice for these kinds of applications because it's a lot more incremental and comes builtin with things like reactivity so there's no need for an external dependency for state management.
Like a complete app is:
---
import Vue from "vue/dist/esm.js";
app = new Vue({el: "#app", template:"<div>{{name}}</div", data: ()=>{{name: "john"}};
---
No jsx, no babel transpiler nonsense, no redux/mobx,
It's also possible to completely forget about vue and do something like
---
let data = app.$data;
data.name = "adam";
---
This is so nice because you don't even have to think about the fact that you're using a framework, it's all taken care of for you. No setState(...) nonsense. The tradeoff is that there's magic (which I don't think is bad because in vue's case it's pretty straightforward once you get to learn it) but that's a separate discussion because I don't think that magic matters for very small simple cases like this.
I'm not sure that's actually a good thing, but it does exist.
In a recent project, I needed a blog where each article would contain a button to tweet it. The problem with nuxt was that all generated HTML pages contained just the globally defined meta tags. A workaround was to hook to the build process of `nuxt generate`.
I'll need to try this, gotta see how deep this goes.
Sometimes the things I'm building I know aren't going to be very large, building a SPA with vue/vue-router and using react-snap[1] seems to be working well... almost seems like cheating.
Now you want to add Disqus comments to your blog. In HTML you edit 10 files. In jekyll that's probably 1 plugin. Same with adjusting theme, fonts, recent posts, generating RSS feed, recent Tweets, ads.
The parcel-plugin-prerender is great, https://www.npmjs.com/package/parcel-plugin-prerender.
Literally any source you can think of.
I disagree.