-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.0] Umbrella issue #796
Comments
Nice TODO list! For my part, I'm working on a gatsby-starter with full typescript support and some dev tool (jest, enzyme, xo, tslint, plop …) 😉 I've got a lot of work to do this starter functional (I want If someone wants to help (dev, tests, code reviews, suggestions…), you are welcome 😃 |
@fabien0102 cool! Yeah, if anyone else is working on their own 1.0 related ideas, please leave a comment! |
@KyleAMathews For webpack config wrapper, why not use redux? (It will be easier to debug and logic with the rest of the stack) |
@fabien0102 hmmmm good point. Yeah, it wouldn't be too much work to write our own custom wrapper and having it work exactly the same as the rest of the stack would as you say make it much easier to debug plus easier to use for people writing plugins as it'd work the same way as everything else. So yeah, just create custom action creators for modifying the webpack config in different ways. Sweet! I'll update the list above. Also, if you want to take this refactor on that'd be great! |
@fabien0102 this is what I was planning on doing for babelrc as well so yeah, it does make tons of sense. |
@KyleAMathews I can take the webpack config on redux refactor ;) (I just want to finish my typescript starter before 😉 ) BTW, if you can fix all tests before, it can be very cool :) (I prefer works in TDD for this kind of feature) |
Hey @KyleAMathews, super excited for v1. I'm looking into how to create a source plugin. It's based off a current metalsmith plugin we have written. It basically combines handlebars and markdown so you can create dynamic markdown documents using partials and generate bunch of pages from a few dynamic markdown files.
EDIT: I just saw v1.0.0-alpha13 release which answers question 1 🎊
|
@craig-mulligan looks like an interesting idea! So what you want to do I think is just write a So files on disk are converted to File nodes which you convert to N markdown nodes. Check out the various transformer plugins, you'll be doing something very similar, implementing Perhaps move this to another issue too as you get into it as I need to start a docs page anyways for writing transformer plugins and helping you through the process would be a good time to do it. |
@KyleAMathews, sounds good! 👍 |
I just created a plugin for styled-components: https://github.com/gutenye/gatsby-plugin-styled-components. In case someone needs it :) |
@gutenye hey! great work on the plugin! But would you mind moving the plugin into this repo? I'd really like core plugins like this to be in the main repository to ensure that they're always up to date and really high quality. E.g. I'm making a lot of API changes right now and I don't want to have to bug you or others to update to the latest alpha when I make a breaking change. If everything is here, it's really easy to make a global copy/replace. Plus with our examples sites, we can ensure that all the plugins are working against every PR. I'm going to claim the NPM packages for all the other styling options plus other core plugins tomorrow so would appreciate it if you add this to the packages directory in the meantime. Would love your help building out other styling plugins here! |
@KyleAMathews Sure, PR is on the way :) |
@gutenye sweet! Added you as a core-maintainer so you can merge PRs around this package and others you want to work on! |
Thanks.
…On Tue, May 30, 2017 at 1:41 PM, Kyle Mathews ***@***.***> wrote:
@gutenye <https://github.com/gutenye> sweet! Added you as a
core-maintainer so you can merge PRs around this package and others you
want to work on!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#796 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAXCyJbG5T23HSzlbtOMZNmrLu9OJfMbks5r-6v1gaJpZM4M8Giz>
.
--
JavaScript, Go, Linux and Open Source
- g <http://GutenYe.com>uten.me
- github.com/g <http://Github.com/GutenYe>utenye
|
I noticed that everytime I create a build, it creates a new version of resources. After two builds, I am left with this:
Is this intentional or are there plans to clear out data in the build process? If not, would you advise against doing a rm public/* before running the build command? Thanks for all your hard work on this by the way! |
Also, for the gatsby-remark-responsive-image plugin, why not have the images stay where they were in the src/pages folder. Currently all the images are being saved to the public root. Maybe I'm being particular, but is there a reason that's the solution instead of keeping images where they were to begin with? For large blogs you could end up with thousands of images in the public root. I can implement if you're in favor. |
Keeping around old builds is actually a good thing as then people on older versions of a site (Gatsby sites are JavaScript apps) can still access bundles for their version of the site. My plan is to delete old HTML files as we definitely want those gone so that deleted pages stop working. |
They have to go here as that's where all the site's assets have to go... why would you want derivative images in your source folders? Gatsby is a build tool so it builds from source to built versions of the source. Images are just another variety of source material that Gatsby can build. |
Thanks @KyleAMathews I get the mentality on the old js builds but after 1000 builds, are you saying you'd expect there to be 1000 versions of the site with no cleanup strategy? In regards to the images, I don't think I was clear. What I mean is this:
|
Most built files wouldn't change but sure, I don't see a problem with this. Depending on the site, I can definitely see garbage collecting stale files after a while but in general, HD space is cheap so why not keep them around forever? It's trivial to clean them out yourself if for some reason that's a requirement for your site.
All built files are content addressable meaning their path is derived from their content. Which makes them safe to cache forever which is really valuable. So no, preserving their source path is not a priority. |
Cool @KyleAMathews that all makes sense. Thanks! |
FWIW: My concern was with github @KyleAMathews. I like to build locally and commit the build to git for deployments to 'dumb' servers that can just serve html and after 1000 builds I worried that things could get larger than github's limits? BUt maybe the size wouldn't be of any consequence and worst case, I can just clear the git history. |
We can definitely revisit the question but most Gatsby site's output is tiny e.g. < 1 mb so size constraints from keeping old builds around won't generally be a problem. |
If this is the working assumption, how does that affect systems such as netlify that I am assuming builds and serves the new stuff, and takes down the old stuff? I'm thinking partially in terms of the service worker exploding if it expects old files that don't exist. |
I'm wondering if a better name for My thinking is that the current name is a little misleading and the intent isn't clear. If I don't want images to be responsive, I may ignore that package all together not realizing that it's necessary to get my images from my markdown files so that they work in my build. If we did change the name, then the default could be to just copy the default version of the image without creating all the responsive versions and we could have a Just a thought. If it isn't helpful, feel free to ignore. :) |
@chiedo could you please create new issues for these ideas/questions? Love the discussion/ideas just this issue isn't meant as a catch-all for 1.0 issues :-) thanks! |
@KyleAMathews yes sir! I misread what umbrella meant haha. I'll move this |
Any updates regarding the i18n topic? I tried to create a simple example by my own but I'm wondering if anybody would like to contribute. What I did so far (it is a really simple example):
File Structure
Base Layout with Header (from the example)
Pages to load languages
Index Page Template
What's missing Link (work in progress) to the repository: https://github.com/wiesson/gatsby-i18n-example // edit Just discovered gatsby-plugin-i18n. I will take a look at the plugin :) |
@wiesson If it can help, I got an i18n system on my own website -> https://github.com/fabien0102/fabien0102.com Just a |
Hey folks!
The remaining work (in my head at least) is starting to settle down into something coherent so I wanted to document my thinking here to get feedback on the vision for 1.0 and give those wanting to help out chunk sized pieces of work to pull off to work on so I can stop being the bottleneck for us shipping 1.0.
Goals for 1.0
To reiterate what I wrote last fall #419
Make building high-performance websites fun by:
TODOs
The following is a loose collection of TODOs for shipping 1.0. Some of them have issues already. Others not. If you want to work on one, please start an issue (or send a PR) claiming it. For more complex issues, please open an issue to discuss things before starting to write code. This is also not a complete list of course so feel free to add comments for other work that needs to done and I'll update the list. Also please file bugs you find as normal issues with the issue title prefixed with
[1.0]
.Check out the contributing guide for how to setup your development environment https://www.gatsbyjs.org/docs/how-to-contribute/
childrenMarkdownRemark
.layouts/index.js
.gatsby serve-build
run on so they don't interfere with the development server..intermediate-representation
to.cache
and store data to be persisted between builds there.packages to their latest version
Post 1.0
Copy default eslint checking from create-react-app
Copy error modal from create-react-app
Make starters searchable from CLI Browsable/searchable list of starters #56
Upgrade to webpack 2
Use Redux for managing the webpack config and for allowing plugins to modify it.
Thinking in Gatsby
Lots and lots of examples. Make them all searchable/browsesable inline in the website
Add support for searching/browsing community plugins from website
Themes
Get minimal theme system in place with rough plans for something more sophisticated. Basic idea is there'll be a
gatsby-theme-core
that all other themes will be based on. The core theme will include the basic Gatsby for the vanilla Gatsby experience. Then on top of that (themes are composable) add a number of other official themes e.g.gatsby-theme-sass
,gatsby-theme-glamor
,gatsby-theme-preact
,gatsby-theme-markdown
,gatsby-theme-blog
, etc. Every theme will have an associated starter which will install the theme w/ a bit of sample content.Setup build performance testing. Perhaps start with a script which auto-generates a site with 100, 1000, 10,000 pages and measures how long it takes to build them from scratch and with cached data.
The text was updated successfully, but these errors were encountered: