Comments (8)
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.
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.
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.
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.
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.
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.
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.
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)
- Outdated reference to Gatsby Cloud in documentation HOT 1
- While shadowing a css file from a gatsby theme the changes are reflected in netlify preview but not on deployment HOT 4
- Null-Byte (\0) in HTML output files
- Missing onError handler for invocation 'building-schema', error was 'Error: Cannot create as TypeComposer the following value: Date.' HOT 1
- onClientEntry not called when using `gatsby develop`
- Redirects and Headers stopped working on Netlify (and work again in gatsby 5.12.12 / adapter 1.0.4) HOT 9
- Showcase page has some sites which are not using Gatsby js anymore, and still they are in Featured sites section HOT 4
- Show case crashed when search HOT 1
- gatsby-source-wordpress (v^7.13.1) incompatible with latest version of WPGraphQL HOT 1
- The repository archived babel-plugin-lodash is using the deprecated isModuleDeclaration.
- Compatibility issues between gatsby-plugin-mdx v5 and remark-gfm v4
- GatsbyImage process the image on build & build is slow HOT 5
- Media Image is null. HOT 1
- double rendering on mobile
- Error on gatsby build command : WebpackError: TypeError: Endpoint URL must start with `http:` or `https:`. HOT 1
- UNHANDLED REJECTION There is no worker with "1" id. when building on aws amplify
- Adding loading strategy to Gatsby GTM plugin (or any other script loader)
- After gatsby build and gserve: not able to access/use newly added files from the server.
- gatsby-plugin-page-creator: slugify.preserveCharacters does not have any effect
- Excessive Build Times with gatsby-source-shopify During 'source shopify variants' Stage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby.