<% const today = new Date(); -%>
<% const date = ${today.getFullYear()}--${today.getMonth() + 1}--${today.getDate()}
; -%>
<% const count = Object.keys(rows).length; -%>
<% const categories = [...new Set(rows.map((content) => content.Category))].sort(); -%>
<% const categorizedLists = categories.map((category) => rows.filter((article) => category === article.Category)); -%>
A curated reading list sync with the Notion Database. Generated by Awesome Reading List
<% if (count) { -%>  <% } -%> <%- -%> <% if (date) { -%>  <% } -%>
<% if (categories && categories.length) { -%>
<% categories.forEach(function(category, index) { -%>
<%- - [${category ? category : 'Uncategorized'} (${categorizedLists[index].length})](#${category ? category.split(' ').join('-') : 'Uncategorized'})
%>
<% }) -%>
<%- -%>
<% categories.forEach(function(category, index) { -%>
<%- ## ${category ? category : 'Uncategorized'}
%>
Link | Created Time | Read | Memo |
---|---|---|---|
<% categorizedLists[index].forEach(function(item) { -%> | |||
<%- ` | [${item.Title | ''}](${item.URL | |
<% }) %> | |||
⬆ Back to Index | |||
<% }) -%> | |||
<% } -%> |
This README was generated with ❤️ by awesome-reading-list