jlord / sheetsee-pocket

A website for your Pocket article archive. Fork-n-Go!
jlord.github.io/sheetsee-pocket
Other
60 stars 94 forks source link

add column to published page #6

Closed nickfrost closed 9 years ago

nickfrost commented 9 years ago

How can I add the author of the article to the spreadsheet in line with the article?

I tried adding a column 'author' to the Google Spreadsheet and add some names, but it didn't reflect on the live site.

Any suggestions?

Thanks!

Nick

jlord commented 9 years ago

Yep!

You'll need to do a few things:

  1. Update your IFTTT recipe so that it sends author information to the spreadsheet
    • This should create an author column or just fill it into the one you've already created
  2. Update the table template in index.html by adding a column for author in the header and rows:
<script id="articleTable" type="text/html">
  <table>
    <tr><th class="fancy">&#8470;</th><th class="date">Date</th><th>Article</th><th>Author</th><th>Tags</th></tr>
    {{#rows}}
      <tr class="{{rowNumber}}"><td class="light-type">{{rowNumber}}</td><td class="date">{{date}}</td><td class="article"><a href="{{url}}" target="_blank">{{article}}</a></td><td>{{author}}</td>
      <td class="tag">{{#tags}}<a href="#">{{tag}}</a> {{/tags}}</td></tr>
    {{/rows}}
  </table>
</script>

:palm_tree:

nickfrost commented 9 years ago

I added it and it looks great! (this is my first ever project on Github)

Thanks a lot for the quick response and help!

jlord commented 9 years ago

Awesome! No problem, excited you're using it!