Skip to content
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

Add kylegach.com to list of sites #270

Merged
merged 0 commits into from May 2, 2016
Merged

Conversation

kylegach
Copy link
Contributor

@kylegach kylegach commented May 2, 2016

Thanks for the great tool! Be sure to check the Colophon. :)

I still have lots of ideas for improvements (some of which I’ll explore submitting for PRs), but there are a few things that I’d appreciate help with, if you’re feeling generous:

  1. https://kylegach.com/writing/ resolves correctly, but https://kylegach.com/writing does not. I tried adding a file writing.md (or writing.js) in the pages (parent) directory, but that didn’t help. Is this something I have to enable on my server?
  2. I tried to split config.toml into two files, one config that holds the usual stuff and one content.toml to hold the non-markdown content used throughout the site (mostly on the homepage). But it couldn’t resolve the content.toml file when I imported it. From what I could tell, this is because there’s some code to handle the config.toml specifically in Gatsby. Or am I missing something?
  3. I use a cut the mustard technique to serve the site’s JS, but I could not figure out a way to put that snippet (config.js.head here) in the head, because it needs to reference the body and the JS apparently executes during the build process?

Thank you again for the wonderful tool. Now that I’ve published my work, I hope to begin contributing.

@KyleAMathews KyleAMathews merged commit bcb5395 into gatsbyjs:master May 2, 2016
@KyleAMathews
Copy link
Contributor

Gorgeous site! Looking forward to your contributions! :-)

To your questions.

To get urls w/o the trailing slash working, this is something you have to enable on your serve. How apache/nginx/etc generally work by default is they a) try to load the url directly e.g. example.com/a-file.html gets mapped to an actually a-file.html on disk and b) if the URL resolves to a directory on disk, find the index.html there. That's how Gatsby works is it compiles every route to an index.html file so /writing/index.html. I haven't set this up before but this post seems to show how to set this up in Nginx https://www.scalescale.com/tips/nginx/nginx-remove-trailing-slash/

I don't have time to debug why your other toml config file isn't loading (it should) but this is the Webpack config — https://github.com/gatsbyjs/gatsby/blob/master/lib/utils/webpack.config.js#L178 if you find the problem, a bug-fix PR would be highly appreciated!

I'm not sure why the "cut the mustard" technique isn't working for you. As long as the JS is set using dangerouslySetInnerHTML you're fine. See my blog here https://github.com/KyleAMathews/blog/blob/e541e5f9609820e9986767ad81bc29e6aaff1d00/html.cjsx#L67

@KyleAMathews
Copy link
Contributor

Btw, reading your performance post, curious what you think about #145 and #100?

@kylegach kylegach deleted the patch-1 branch May 3, 2016 04:27
@kylegach
Copy link
Contributor Author

kylegach commented May 3, 2016

Thank you for the kind words and insights, Kyle. And I’m honored that you read some of my writing!

I’ll give some of your suggestions for my issues a try and post back with results.

I’m quite interested in both of those issues. You might have noticed that the performance post was just “Part 1”. Part 2 will be stripping out unused CSS and inlining the result. I figured for a site as stylistic simple as mine, this would be a much easier approach than determining the truly critical, above the fold CSS... but I ran into some issues with the only suitable tool I could find. Part 3 is likely to be removing React from the client-side (that ~200 Kb payload just isn’t worth the barely-faster repeat views, imo), and Part 4, if I can make it work, will be a service worker implementation.

@KyleAMathews
Copy link
Contributor

Sounds great! Looking forward to future parts. Frontend performance has been a hobby of mine for a while. webpagetest.org and I are buds :-)

On the 200kb js bundle — would you feel differently with code splitting? E.g. if a first-time visitor only loaded say ~60kb?

@kylegach
Copy link
Contributor Author

kylegach commented May 4, 2016

On the 200kb js bundle — would you feel differently with code splitting? E.g. if a first-time visitor only loaded say ~60kb?

I may have misunderstood how code splitting works and which situations it benefits. That would certainly sway my opinion, though perhaps not enough to change the decision.

Btw, is there a better place for these sorts of conversations than here? I don't want to add too much noise to the issues/PRs.

@KyleAMathews
Copy link
Contributor

Right now Gatsby puts in the bundle.js all JS modules & page data (HTML, etc.) from the entire site. Code splitting means merely that when loading a page say the front page you'd only load the JS & data for that page. Then when navigating to another page, your site would load a new bundle for that page and so on.

See #10 for more.

What sort of place were you thinking of? As far as I'm concerned issues/PRs are the place for conversations :-) Everything we're talking about here is on topic.

@jlengstorf
Copy link
Contributor

Hiya @kylegach! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

@kylegach
Copy link
Contributor Author

Thanks, @jlengstorf!

I'll certainly take you up on both. :)

Btw, I created the site referenced by this PR to get a job (it worked! 🎉), and I'll be updating it to use the latest Gatsby soon, as I'm in the market again. Looking forward to taking advantage of all the additional features and improvements the team has made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants