These are chat archives for jescalan/roots

30th
Jun 2015
Nishant Menon
@nishtacular
Jun 30 2015 05:51
page = require 'page'

# app-wide routing
page.base '/'
page '/', index
page '/about', about
page '/contact', contact
page()

#index page
index= () ->
    # index logic
about = () ->
    # about logic

contact = () ->
    # contact logic

notfound = () ->
    # 404
Hey guys, I'm struggling to implement page.js with roots. Listed above is an excerpt of the code in main.coffee
When I implement the above the site simply cycles through all the links in an infinite loop. Any pointers will be greatly appreciated. Thanks :smile:
Henry Snopek
@hhsnopek
Jun 30 2015 14:42
@ladislavsulc This is what I would do, I would compile to css then use postcss to autoprefix everything
Henry Snopek
@hhsnopek
Jun 30 2015 14:48
@nishtacular you'll need to also add at the end page '*', notFound to grab everything
then as well you need to go to app.coffee and add this
server:
    clean_urls: true
Nishant Menon
@nishtacular
Jun 30 2015 15:49
@hhsnopek thanks mate. I had the clean_urls setup, but it does seem to be working now. I had been changing a few things around, but it seems to be all sorted now. Thanks :smile:
Henry Snopek
@hhsnopek
Jun 30 2015 15:50
perfect :D
Noel Quiles
@EnMod
Jun 30 2015 16:21
@t0t what exactly were your errors with roots-contentful?