These are chat archives for jescalan/roots

Jan 2016
Jan 19 2016 16:34
@stevesunderland thanks!! that worked a treat
wondering if some of these things should be added to the readme or maybe an example page. I'd love to help
Jan 19 2016 17:24
This message was deleted
Jan 19 2016 22:06

Another Contenful question:

Regarding locales and how to access the info in a DRY manner

my site is structured like this

        |  |___ index.html
        |  |___ subpath1/
        |  |   |__page-1-en.html
        |  |   |__page-2-en.html
        |  |___ subpath2/
        |      |__page-3-en.html
        |      |__page-4-en.html  
          |___ index.html
          |___ subpath1/
          |___ subpath2/

my current config file is

      access_token: '#####'
      space_id: '#####'

          id: 'page'
          template: 'views/_posts_en.jade'
          path: (entry) ->"spanish/#{entry.subpath}/#{entry.title}")

          id: 'page'
          template: 'views/_posts_es.jade'
          path: (entry) -> ("spanish/#{entry.subpath}/#{entry.title}")

I would like to be able to specify the locale in each layout file

say for example my pages layout jade files

_layout_es.jade -> for lang as ['es'] which gives me the spanish locale values

-layout_en.jade -> for lang as ['en'] which gives me the english locale values

and then have each layout file be

block content

  h1= entry.title
  != markdown(entry.copy)

  img(src!= asset(entry.hero_image, {w: 600, h: 100, q: 50}))

  //-the version of the same page in the other locale
  //- need this for a language switcher button and the hreflang link
  a(href= entry._url.the-other-locale)= event.title.the-other-locale

Is this possible?