clearbold / artx

1 stars 0 forks source link

YAML formatting #2

Closed heymarkreeves closed 10 years ago

heymarkreeves commented 10 years ago

Hi, Angela!

I'm seeing some python character encoding stuff in the posts files. Will that be cleaned up? Is it possible for the output to be formatted with line breaks, too, for readability?

Thanks!

heymarkreeves commented 10 years ago

This may have been what you referred to as "extra markup" -- Sorry, I was thinking of markup in the data. I'd like it to be human-readable, and just:

field_name: "field data"

As much as possible.

Thanks!

atosca commented 10 years ago

Hi Mark,

Let me know what you think of the format of the YAML files now. The dates should be working as well.

A couple outstanding questions:

heymarkreeves commented 10 years ago

This looks great for us to start pulling in!

For post type, events and exhibitions currently have a field called event_type, and locations have no "type" field. Do I want to add to all posts a "type" or "post_type" field, or is this enough to tell them apart?

When you say "locations," are you referring to a Location post file or location data within a post file? Can you send a GitHub link (like https://github.com/clearbold/artx/blob/master/_site/2014/08/07/day-trip-college-art-museums-in-the-pioneer-valley.html) to an example?

Should the post "description" be made into the main body of the post?

I think so.

Right now the only characters I'm allowing in the title are lowercase letters and a dash in place of spaces. There are couple titles -- for instance, one called "6:30 am Robert Wiengarten" -- that don't fit this pattern. I'm assuming these will be cleaned up on their end, but let me know if I should be handling edge cases for titles.

Are you referring to the YAML name field or the filenames? In either case, I think we just need the basics as we're just creating proof-of-concept filler content. The real stuff will be db-driven in their app.

Thanks!

Mark

atosca commented 10 years ago

When you say "locations," are you referring to a Location post file or location data within a post file? Can you send a GitHub link (like https://github.com/clearbold/artx/blob/master/_site/2014/08/07/day-trip-college-art-museums-in-the-pioneer-valley.html) to an example?

I'm referring to location post files - here's an example.

https://github.com/clearbold/artx/blob/master/_site/2014/06/05/harvard-art-museums.html

Are you referring to the YAML name field or the filenames? In either case, I think we just need the basics as we're just creating proof-of-concept filler content. The real stuff will be db-driven in their app.

Here I'm referring to the YAML filenames...but it sounds like I don't need to worry about it yet! I'll play with making the description field the content and make one more commit.

heymarkreeves commented 10 years ago

Ah! OK for Events vs. Exhibitions vs. Locations, we need to leverage Collections in Jekyll:

http://jekyllrb.com/docs/collections/

It's a new feature, but that will let us load them distinctly where relevant.

Mark

atosca commented 10 years ago

That makes sense. Do they need to be broken into three collections within the _posts folder?

heymarkreeves commented 10 years ago

I think so. I think we can merge the events & exhibitions collections where we need to for things like the calendar using Jekyll code. And then locations should be the distinct third.

atosca commented 10 years ago

Ok. Also, just so I'm understanding properly, the final formatting should look like this, correct?


database_field: value database_field: value database_field: value

description

Right now I have the pyyaml library dumping out a YAML object containing the post contents into a file, but I think to format these as Jeckyll posts with YAML front matter I'm better off constructing the post as a string and avoiding the pyyaml library -- I have better control over the format that way.

heymarkreeves commented 10 years ago

That's correct!

heymarkreeves commented 10 years ago

These look good.