News for hackers. Stuff that matters.
Re:Ockam built a JAMStack site and it's 100% Open Source by ChymeraXYZ on Thursday April 09, 2020 @04:11PM (#22826675)
I don't know but somehow the ockam.io page being blank except the menu somehow does not inspire confidence...
Re:Ockam built a JAMStack site and it's 100% Open Source by ithrow on Thursday April 09, 2020 @04:03PM (#22826594)
There are two primary advantages for the ockam.io site to use JAMStack:

No need for a database or complex backends

Building and hosting are decoupled

I don't get it, since when building a static site requires a database? Are they referring to eliminating some kind of CMS?

Re:Ockam built a JAMStack site and it's 100% Open Source by miedziak on Thursday April 09, 2020 @06:38PM (#22827932)
I think the point is that ockam site requires a flexible layer to manage its data, which is focused mostly on .md documentation files. So Storing, updating and managing these files through a database could be quite hard and annoying, since all of them are stored across many different github repos. Moreover, all these files, have to be shown in a user-friendly way. This data from .md files, have to be converted to HTML at some point as well.

So what we have done is we keep all data on their place ( depended github repos ), grab them before build time, and generate static content based on it. Moreover, we have some mechanism to target particular branches/commits on depended repos, and control when we want to trigger our pipelines.

So, replaying directly to your question - no, building a static site not require a database. JAMStack architecture is helping us to provide and manage our specific data sources.

Re:Ockam built a JAMStack site and it's 100% Open Source by mattgreg on Friday April 10, 2020 @08:48PM (#22838826)
...exactly!
Re:Ockam built a JAMStack site and it's 100% Open Source by littlecranky67 on Thursday April 09, 2020 @05:02PM (#22827160)
Well in the JAMstack a database (or any other datasource) can be used and required during the build step, which will generate the static html using that datasource (see getInitialProps in nextJS). Once the static html is generated and output, the datasource is not needed anymore.

This is pretty much in contrast to other stacks, where more often you will not need a database at compile time, but only at runtime. Of course, the statically generated HTML will not update unless rebuild and deployed (except if you use a hybrid static/dynamic approach using Javascript or the completely server-side rendered mode, both of which are also supported by nextjs).

Re:Ockam built a JAMStack site and it's 100% Open Source by mattgreg on Thursday April 09, 2020 @04:07PM (#22826638)
Here is all the source code and build systems for the Ockam.io site: https://github.com/ockam-network/website
Re:Ockam built a JAMStack site and it's 100% Open Source by chrisacky on Thursday April 09, 2020 @04:12PM (#22826692)
Code looks really clean. What's the naming reasoning behind `mdxComponents`. Does mdx mean something?

`Blockqute` is that a typo?

I like how you handle MenuItems on mobile.

Re:Ockam built a JAMStack site and it's 100% Open Source by miedziak on Friday April 10, 2020 @09:51AM (#22832976)
Yea, it's related to https://mdxjs.com. All .md files can contain valid jsx code. This `mdxComponents` folder name, refers to components that could both be - used directly in markdown files or used to generate html from markdowns.
Re:Ockam built a JAMStack site and it's 100% Open Source by emptysea on Thursday April 09, 2020 @04:17PM (#22826750)
Might be related to https://mdxjs.com
Re:Ockam built a JAMStack site and it's 100% Open Source by stabbie_mcgee on Thursday April 09, 2020 @04:08PM (#22826646)
That's all good and well, but the actual website fails to render on Firefox (OSX Catalina)
Re:Ockam built a JAMStack site and it's 100% Open Source by mattgreg on Thursday April 09, 2020 @04:13PM (#22826695)
Thanks for the heads up...Maybe the build we did this morning has a bug for firefox. Let me take a look.
Re:Ockam built a JAMStack site and it's 100% Open Source by stabbie_mcgee on Thursday April 09, 2020 @04:55PM (#22827087)
Sorry I should add - Works fine for me in Safari and Chromium, in Firefox the header and footer render fine, but the content fails to display. There are no console errors.
Re:Ockam built a JAMStack site and it's 100% Open Source by agrippanux on Thursday April 09, 2020 @04:20PM (#22826775)
RedwoodJS recently fixed an issue with their JAMStack framework failing on current Firefox - maybe check out their github issues.
Re:Ockam built a JAMStack site and it's 100% Open Source by mattgreg on Thursday April 09, 2020 @04:16PM (#22826732)
Huh. It looks fine on my Firefox browser...tell me more.
Re:Ockam built a JAMStack site and it's 100% Open Source by yingw787 on Thursday April 09, 2020 @03:57PM (#22826519)
I really want to find a great open-source JAMStack documentation site for APIs. Does one exist somewhere?
Re:Ockam built a JAMStack site and it's 100% Open Source by chrisacky on Thursday April 09, 2020 @04:17PM (#22826744)
I'm planning on migrating all our Postman documentation away to https://github.com/slatedocs/slate if that's what you mean.

PS. The reason why we're moving away from Postman is due to some tiny issue[1] that has caused lots of "you need to click here to see everthing" conversations.

[1] : https://github.com/postmanlabs/postman-app-support/issues/57...

Re:Ockam built a JAMStack site and it's 100% Open Source by yingw787 on Thursday April 09, 2020 @05:56PM (#22827623)
I'm not quite sure what you mean by "Postman documentation". Is this Postman's documentation or documentation for other APIs (not sure if Postman has an OpenAPI spec?).

I found slate, and it's super cool, but I haven't used it myself. There might be some pipelining involved, from my understanding of projects like https://github.com/Mermade/widdershins where you convert OpenAPI specs to markdown?

I think the good folks over at getstream.io used slate as a base for their docs CMS and loved it enough to write about it, and I'd love to read more about slate in production. Looking forward to when you finish your migration and if you write about it!

Re:Ockam built a JAMStack site and it's 100% Open Source by mattgreg on Thursday April 09, 2020 @04:24PM (#22826822)
We may have built it for you...if you go to our /learn page check out how we built the documentation sections. all the source is md in github. here is an example: https://www.ockam.io/learn/proposals/0003-key-agreement-xx/

note the 'edit on github' link on the right to get to the source.

Re:Ockam built a JAMStack site and it's 100% Open Source by yingw787 on Thursday April 09, 2020 @05:49PM (#22827569)
I just git cloned, installed, and ran dev, and yeah it does have everything! I thought it was just the landing page! This is really cool, thank you very much for open sourcing this!
Re:Ockam built a JAMStack site and it's 100% Open Source by 40four on Thursday April 09, 2020 @04:09PM (#22826657)
Edit: think I misunderstood :) I have used Vuepress before, it is geared towards building documentation. I believe Vue’s own docs use it. I had a good experience with it, would recommend!

https://vuepress.vuejs.org/

Re:Ockam built a JAMStack site and it's 100% Open Source by yingw787 on Thursday April 09, 2020 @05:52PM (#22827590)
Hmm, I found this theme and it wasn't bad: https://github.com/FriendlyUser/vuepress-theme-cool

Do you know of any other Vuepress documentation themes, or where I could find them? I like Hugo because they have a curated open-source showcase of different themes @ themes.gohugo.io, so you don't have to search around the web to find stuff.

Re:Ockam built a JAMStack site and it's 100% Open Source by sobi3ch on Friday April 10, 2020 @01:47AM (#22830341)
This is a great platform for IOT!