Skip to content

davvidbaker/brainsandspaceweekly-frontend

Repository files navigation

warning

brains and space weekly

"weakly" publication

  • publishing as fast as we can, but the goal has always been 1 week from whiteboard to interwebs

System Architecture

for brainsand.space aka brainsandspace.com

  • Uses github pages & jekyll to serve this repository to custom domain.
  • There is also a Linode server at IP address 69.164.222.13 that is used for hydrating the posts with external data. It is running sinatra on Unicorn with nginx acting as a reverse proxy.

Developing a new post

  • Make a new folder in /_src and name this folder the title of the 'post'.
  • cd into that folder
  • run npm init or copy a package.json from another post if you want
  • In this new folder, make a webpack.config.js file in the fashion of the one in /_cabinets.
  • create an index.html file that references your bundle(s). This is (for now at least) only for pre-production.
  • To test without having to use local server (which wasn't autogenerating for me on Windows), cd into /_src/[post_folder] and run npm start which will set up a webpack-dev-server that serves the dummy index.html from the bundles directory. Make sure you are using the right src script in there.

To serve Jekyll locally (and in production)

  • From /_src, run npm run build, which will build a webpack bundle javascript file in /dist. This is the file you want to reference from your post.
  • cd to root directory and then bundle exec jekyll serve

file structure

New 'posts' are in /_posts, and they reference js bundles built by webpack and emitted to /dist.

Todo

  • better workflow
    • but is this ever really done?
  • arhitecture diagram
  • reuse components
    • includes most likely setting up codesplitting
  • use yarn
  • use docker for dev environment
  • test more rigorously
  • create and use a yeoman generator for generating new post file structure

About

weekly publication

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published