These are chat archives for jescalan/roots

13th
Oct 2015
Andy Shora
@andyshora
Oct 13 2015 09:56
Anyone seen this when installing roots-yaml? yaml is not a function
Using roots v 3.1.0
Andy Shora
@andyshora
Oct 13 2015 10:10
When I remove the dynamic content extension it works fine.
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:10
@andyshora I didn't back when I used it. Is there a stacktrace and anything else that might be relevant (os, npm version)
ah, dynamic-content & roots-yaml is.. an interesting combination from what I recall.
Andy Shora
@andyshora
Oct 13 2015 10:19
@SevereOverfl0w I removed the roots-yaml extension, now I'm getting errors from the dynamic content extension.
compiling... Warning: missing space before text for line 3 of jade file "/Users/andy.shora/Dev/website/views/index.jade"
{ [Error: /Users/andy.shora/Dev/website/views/index.jade:4
    2| ---
    3| title: 'Hello world!'
  > 4| date: 1/2/2014
    5| ---
    6| extends layouts/_base
    7|

Unexpected token `tag` expected `text`, `code`, `:`, `newline` or `eos`] path: '/Users/andy.shora/Dev/website/views/index.jade' }
can you see anything from with that?
So frustrating, I've been recommending Roots to a bunch of people, but it's so unstable
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:21
You're putting front matter into your views, it needs to go into a different directory for use with dynamic-content.
e.g. blog_posts or something.
Andy Shora
@andyshora
Oct 13 2015 10:22
Ah, ok thanks. Won't that affect the URL structure?
Say I want to have top level pages using frontmatter
I moved the file into a directory, same error.
Oh, you mean not in views at all
Same error:
compiling... Warning: missing space before text for line 3 of jade file "/Users/andy.shora/Dev/website/case-studies/f1.jade"
{ [Error: /Users/andy.shora/Dev/website/case-studies/f1.jade:4
    2| ---
    3| title: 'F1 Case Study'
  > 4| date: 1/2/2014
    5| ---
    6| extends views/layouts/_base
    7|

Unexpected token `tag` expected `text`, `code`, `:`, `newline` or `eos`] path: '/Users/andy.shora/Dev/website/case-studies/f1.jade' }
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:26
I am wondering if dates are part of front-matter
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:28
What's on line 1?
Andy Shora
@andyshora
Oct 13 2015 10:28
empty line. I tried without as well
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:29
You got this project on github so I can have a play with it? See if I can figure it out?
Andy Shora
@andyshora
Oct 13 2015 10:31
Nope, sorry
Do you know if there are any examples of roots working with dynamic content on github?
I mean, I made my site work with it http://andyshora.com/
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:31
https://github.com/SevereOverfl0w/Portfolio my portfolio works with it.
Andy Shora
@andyshora
Oct 13 2015 10:32
using the latest versions?
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:32
I used v3.1.0 to dev it.
Also, hi, fellow brit
Andy Shora
@andyshora
Oct 13 2015 10:32
Ah, but not using dynamic content
:-)
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:32
I included it as a dependency..
Andy Shora
@andyshora
Oct 13 2015 10:33
I just need a way to pull dynamic content into the layout
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:33
It does use dynamic-content?
Andy Shora
@andyshora
Oct 13 2015 10:34
Oh, sorry, didn't look in there!
Comparing to mine...
thanks
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:42
Np :p Let me know what it is, and I'll see if the docs need changing a little.
Andy Shora
@andyshora
Oct 13 2015 10:43
I converted my app.coffee into app.js and now I'm getting this:
compiling... { [TypeError: /Users/andy.shora/Dev/website/views/layouts/_page.jade:11
    9|     meta(name="viewport" content="width=device-width, initial-scale=1")
    10|     link(rel="shortcut icon" href="/favicon.ico")
  > 11|     != css()
    12|
    13|   body
    14|     p= post.title

css is not a function]
  path: '/Users/andy.shora/Dev/website/views/layouts/_page.jade' }
This is my app.js:
var js_pipeline = require('js-pipeline');
var css_pipeline = require('css-pipeline');
var dynamic_content = require('dynamic-content');

module.exports = {
  ignores: ['readme.md', '**/layout.*', '**/_*', '.gitignore', 'ship.*conf'],
  extensions: [
    js_pipeline({
      files: 'assets/js/*.js'
    }),
    css_pipeline({
      files: 'assets/css/styles.scss',
      out: 'css/main.css'
    }),
    dynamic_content()
  ],
  'coffee-script': {
    sourcemap: true
  },
  jade: {
    pretty: false
  }
};
Ok, so the error changes between the 2 randomly
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:46
That function is suppose to be provided by css_pipeline.
Andy Shora
@andyshora
Oct 13 2015 10:46
1 in 4 times it generates the css error
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:46
Race condition then.
Meaning the function isn't initialized when the view is being created at times. I must say, you're an absolute mystery to me at the moment :p
Andy Shora
@andyshora
Oct 13 2015 10:47
Fuck it, I'm gonna switch to Jekyll
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:47
@jenius is the best guy to bother, he's seen it all.
Andy Shora
@andyshora
Oct 13 2015 10:47
this is too unstable
thanks anyway!
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:47
heh, this is a strange event, I must say.
No problem.
Andy Shora
@andyshora
Oct 13 2015 10:49
@SevereOverfl0w I cloned and built your site no problem :-/
I need some food, then I'll do a proper comparison!
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 10:50
oh, how strange :p check package versions, always a good one to check.
Adam Argyle
@argyleink
Oct 13 2015 15:40
We have a site working with dynamic content and yaml, find it here https://github.com/intel-android/androidhub
There is an occasional error where dynamic content data isnt ready to compile jade, but it tries anyway and produced an error, 1 in 10 passes repro it.
@andyshora take anything you want from it
Adam Argyle
@argyleink
Oct 13 2015 16:24
how does roots do on windows..?
Adam Argyle
@argyleink
Oct 13 2015 17:33
roots site went live today https://androidhub.intel.com/
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 17:37
@argyleink It should work, from what I've seen.
@argyleink also, that site is great!
Adam Argyle
@argyleink
Oct 13 2015 17:38
thanks =) lots of fun inline svg, jade makes it nice and pretty to work with. fun making super fast static sites.
Dominic Monroe
@SevereOverfl0w
Oct 13 2015 17:42
yeah