Giter Site home page Giter Site logo

Comments (8)

KyleAMathews avatar KyleAMathews commented on April 28, 2024

That'd be great! I'm a solo technical startup founder so I really don't have time to be working on a big open source project like this :) so would love to join forces with like-minded folks.

I'm not super familiar with Antwar. Where do you see areas where we can collaborate?

from gatsby.

bebraw avatar bebraw commented on April 28, 2024

Well, we have a fairly extensive plugin system in Antwar. The plugins themselves are quite simple. A couple of examples: rss-plugin, prevnext-plugin. They can attach themselves to various processing hooks. You could reuse our work by implementing some sort of adapter or matching the design.

Antwar is structurally more flexible. It accepts literally anything. It's up to you to configure it. I've done something fairly complicated at SurviveJS site. And from my perspective that's great! I can map GitBook content to my site while using Leanpub definitions (Book.txt, custom syntax) with no problems. This leads me to think that we might be able to adapt Antwar to run gatsby sites.

If we share enough common goals one option would be to merge the projects. We can for instance adapt Antwar APIs closer to gatsby. I would love to ditch mixins and go through props. A merge comes with its issues but it's more sustainable than to "compete". After all both of us want a solid site generator.

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

So Gatsby seems much more of a convention over configuration software than Antwar. For example files are translated directly into pages e.g. /docs/help/index.md becomes /docs/help/index.html.

https://github.com/gatsbyjs/gatsby/blob/master/lib/utils/glob-pages.coffee reads files off the fs and https://github.com/gatsbyjs/gatsby/blob/master/lib/isomorphic/create-routes.coffee turns the file structure into a React Router configuration. File information + file metadata (e.g. compiled Markdown body + frontmatter) get passed down to templates and page renderers.

With this Gatsby gets zero-reload page transitions etc. It's basically an auto-generated SPA with each page having its own pre-rendered static entrypoint. Everything is designed around making this really easy.

I want to formalize extension points for Gatsby so syncing plugins with Antwar makes sense but we'd need to agree on a common file object format to do that.

from gatsby.

bebraw avatar bebraw commented on April 28, 2024

So Gatsby seems much more of a convention over configuration software than Antwar. For example files are translated directly into pages e.g. /docs/help/index.md becomes /docs/help/index.html.

Exactly. Antwar is the exact opposite on this regard. Configuration over convention. It's like webpack but for static sites. We wanted specifically something that provides a lot of programmability. :)

With this Gatsby gets zero-reload page transitions etc. It's basically an auto-generated SPA with each page having its own pre-rendered static entrypoint. Everything is designed around making this really easy.

This is probably where I can learn from you. We generate the site through React Router as well. The eventual idea is that it should be possible to hit between static/dynamic loading. I mean the first hit will always be static loading but after that React Router can kick in and start loading dynamic content bundles -> no refresh. Webpack can deal with the heavy lifting here and generate those for us. If JavaScript is disabled it will revert to static behavior.

It is possible you might have something like this already. I didn't look that closely. 👍

For me that static/dynamic thing would be awesome as it might allow more interesting transitions between pages and most importantly scroll based user interfaces. New content would appear as you scroll getting you a little nicer ux. This is handy especially for blog indices and such. And all of this is possible through a static site generator without having to drop a backend into the mix.

I want to formalize extension points for Gatsby so syncing plugins with Antwar makes sense but we'd need to agree on a common file object format to do that.

There are probably two bigger things to resolve: theming and plugins. Especially when it comes to theming Antwar is a little weak. We provide starting points but quite soon you'll have to start overriding layouts. It's possible we're approaching it wrong. Composition might be a better way here.

Given we're both operating with React we can perhaps find a lot of common especially here. Our current system relies on custom mixins but I would love to move to use props instead as that's Antwar agnostic way to deal with it.

Antwar provides a large amount of hooks for plugins. For instance ga-plugin injects to body. Same goes for prevnext-plugin. prevnext-plugin also shapes page data (adds prev/next info). This additional data can be used to render actual elements. highlight-plugin is more complex as it performs some postprocessing.

I've described the basic interface at plugin-boilerplate. That gives you the hooks we're using. You may want to grep Antwar source to see where they are used exactly and how.

I expect the current plugin format is quite close to something that could work for both projects. They are just React components that have been wrapped in a function after all so there isn't anything in particular that ties them specifically to Antwar apart from prevnext-plugin as that operates on Antwar page structure.

@eldh Feel free to comment on this thread.

from gatsby.

eldh avatar eldh commented on April 28, 2024

Would be awesome if there are ways to share code. I think you have covered the entry points.

I'd also love to see Antwar implement the SPA generation. Should look into using Gatsby code for that :)

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

On theming, I really like what I came up with. It mirrors the React Router api so you can very easily nested UI templates. I've found this system very intuitive for both normal SPA as well as the Gatsby sites I've built/am building.

For example in the docs example site, this is the top-level template which sets up the site header + grid container.

Then this is the template for individual (markdown) pages. Because of the nesting UI from React Router, the templates are mostly decoupled.

from gatsby.

gesposito avatar gesposito commented on April 28, 2024

These are my current top 2 project for React static sites, I follow both of them waiting for more.
I'd love you guys joining forces, I love the React Router based (isomorphic) theming and the plugins system.

from gatsby.

KyleAMathews avatar KyleAMathews commented on April 28, 2024

Cleaning up issues and closing this as the discussion's petered off. Happy to collaborate still if we come across more joint issues.

from gatsby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.