Giter Site home page Giter Site logo

jschr / jschr.io Goto Github PK

View Code? Open in Web Editor NEW
71.0 4.0 8.0 926 KB

The static website generator service behind jschr.io.

Home Page: http://jschr.io

TypeScript 68.64% HCL 20.59% Shell 10.77%
typescript react terraform boilerplate aws-lambda webpack2 infrastructure static-site-generator static-site

jschr.io's Introduction

jschr.io's People

Contributors

jschr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jschr.io's Issues

Fix live reloading in dev

Switched to browser sync because of this issue with static-site-generator-plugin and webpack dev server: markdalgleish/static-site-generator-webpack-plugin#79

Browser sync isn't live reloading on change and the DX is worse because you now you need to open up two separate processes yarn start and yarn run serve.

Try to get webpack dev server working again, this SO post suggests it should be possible: http://stackoverflow.com/questions/40828906/webpack-2-static-site-generator-plugin-self-is-not-defined

Make it easier to customize

I'm passing in config like github username, twitter, etc.. through environment variables which binds the infrastructure to the app.

To make it easier to use as a boilerplate, all you should need to do is make your own getProps function and create the components (assuming you want the same infrastructure).

Move app props variables to getProps.

Make app env vars a map in tfvars and pass directly to lambda function.

I'll need to update the readme.

Setup CloudFront SSL cert

GA can't infer the referrer website if https -> http

Will need to add how to generate a free SSL cert with AWS Certificate Manager to the docs and dev.tfvars.sample

screw_ie8 is not assignable to type 'boolean'

Hello, found your site on reddit and saw there was a tutorial for it on your github. I've recently become interested in Serverless architecture and decided to try to use your code to create my own. Upon setting all the env variables and running yarn start I get this error:

TSError: ⨯ Unable to compile TypeScript app/webpack.config.ts (77,15): Argument of type '{ compress: { screw_ie8: boolean; }; }' is not assignable to parameter of type 'Options'. Types of property 'compress' are incompatible. Type '{ screw_ie8: boolean; }' is not assignable to type 'boolean | CompressOptions'. Object literal may only specify known properties, and 'screw_ie8' does not exist in type 'boolean | CompressOptions'. (2345) at getOutput (/Users/quintenoneal/Desktop/jschr.io-master/node_modules/ts-node/src/index.ts:307:15) at /Users/quintenoneal/Desktop/jschr.io-master/node_modules/ts-node/src/index.ts:336:16 at Object.compile (/Users/quintenoneal/Desktop/jschr.io-master/node_modules/ts-node/src/index.ts:498:11) at Module.m._compile (/Users/quintenoneal/Desktop/jschr.io-master/node_modules/ts-node/src/index.ts:392:43) at Module._extensions..js (module.js:654:10) at Object.require.extensions.(anonymous function) [as .ts] (/Users/quintenoneal/Desktop/jschr.io-master/node_modules/ts-node/src/index.ts:395:12) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3) at Module.require (module.js:587:17)

When I remove the screw_ie8 line in webpack config I get a status code 400 when running the command. Any idea what could be the issue?

Reddit?

Could pull latest post, comment, saved post, etc...

This would add 5 sources, I think the current design looks best at 4. Would be cool to sort by recent content and take the top 4 social links making the site more dynamic.

There's no point to sending the bundle to the browser

There's no actual JS dependency since removing web font loader in favour of inlining the fonts.

Can also use renderToStaticMarkup instead to get the initial App html.

There would also be no point in having mount.ts and index.ts.

If I do remove it I should provide instructions in the readme on how to add it back.

OAuth integrations (Spotify)

Would love to support Spotify Player API to get currently playing track but this needs to be done through OAuth (login with your Spotify account)

This means I need a public endpoint for Spotify to redirect to.

Could setup an APIG endpoint and save the access token to dynamo (or elasticache).

Using S3 and APIG redirects I could make a simple (and secure!) workflow for authenticating:

jschr.io/spotify?token={token} -> auth lambda (verify token) -> redirect to spotify login ->user login -> redirect to save access token lambda -> redirect to jschr.io

Token can be a APIG key but need a lambda to verify the query string parameters because APIG auth uses a x-api-key header.

https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow
https://developer.spotify.com/web-api/get-the-users-currently-playing-track/
https://api.producthunt.com/v1/docs
http://blog.ryangreen.ca/2016/01/04/how-to-http-redirects-with-api-gateway-and-lambda/
http://stackoverflow.com/a/22750923/1249098

Modularize social link

// getProps

return {
  socialLinks: [
     { icon: require('./assest/github.svg'), label: 'my code', summary: '...', url: '...' },
     { icon: require('./assest/medium.svg'), label: 'my stories', summary: '...', url: '...' },
     ...
  ]
}


// App.tsx

retrun (
   <Content>
       socialLinks.map(props => <SocialLink {...props} />
   </Content>
)

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.