diff --git a/.eleventy.js b/.eleventy.js index 23fa4d8b5a4d5a9e0ab2a28a3c5fbd778312ab61..64e9751dd1cce9f34e1e05636beabda49de984d5 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -30,6 +30,14 @@ module.exports = function (eleventyConfig) { }); + eleventyConfig.addCollection("blog", collectionApi => { + return collectionApi.getFilteredByGlob("src/blog/posts/*.md").sort((a, b) => a.data.date - b.data.date); + }); + + eleventyConfig.addCollection("articles", collectionApi => { + return collectionApi.getFilteredByGlob("src/articles/*.md").sort((a, b) => a.data.date - b.data.date); + }); + // eleventyConfig.addFilter("search", searchFilter); // eleventyConfig.addFilter("searchSingle", searchFilterSingle); diff --git a/Coko_Copy_Worksheet_V1-adam.docx b/Coko_Copy_Worksheet_V1-adam.docx new file mode 100644 index 0000000000000000000000000000000000000000..5b3c305bf9a1c661acac6c5499816f43792438f1 Binary files /dev/null and b/Coko_Copy_Worksheet_V1-adam.docx differ diff --git a/src/articles/articles-index.md b/src/articles-index.md similarity index 52% rename from src/articles/articles-index.md rename to src/articles-index.md index a21ebff85491011cdc7fea710b6cc44831d23ab3..b11aedbd1c2ee439da503f2ecded8e75fbc3dc21 100644 --- a/src/articles/articles-index.md +++ b/src/articles-index.md @@ -1,11 +1,12 @@ --- title: Articles -layout: blog-index.njk +layout: articles-index.njk permalink: /articles/index.html -menu: False +menu: true +menutitle: Articles class: articles heading: We explain. chapeau: --- -The latest news from Aperture! \ No newline at end of file +This is where the articles will be \ No newline at end of file diff --git a/src/blog/blog-index.md b/src/blog/blog-index.md index 685b0f9575225ea463d8a9757dd1ac29646e70b1..254f2a0da7ed7b3e8c0e4cfc282c8a898541b710 100644 --- a/src/blog/blog-index.md +++ b/src/blog/blog-index.md @@ -2,7 +2,8 @@ title: News layout: blog-index.njk permalink: /blog/index.html -menu: False +menu: true +menutitle: blog class: blog --- diff --git a/src/blog/post/entries.json b/src/blog/post/entries.json deleted file mode 100644 index a73391a05144264a4b371b6fb0fbd48aaab0de4f..0000000000000000000000000000000000000000 --- a/src/blog/post/entries.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "author": "Coko" -} \ No newline at end of file diff --git a/src/blog/post/entry1.md b/src/blog/posts/entry1.md similarity index 83% rename from src/blog/post/entry1.md rename to src/blog/posts/entry1.md index 1c74f67f9c5a128effab26e628e30474fa89c8cd..25af109cb370712e1db99cd9c83de1794026f2f3 100644 --- a/src/blog/post/entry1.md +++ b/src/blog/posts/entry1.md @@ -1,10 +1,12 @@ --- title: Aperture is Proud to Announce Upcoming Transition to Kotahi, an Open Source Modern Scholarly Publishing Platform date: 2021-06-20 -layout: blogpost.njk +intro: Kotahi is now in production for eLife for publishing reviews, and is supported by a wide group of interesting partners like <a href="https://www.eko-konnect.org.ng/">Eko-Konnect</a>, <a href="https://enableoa.amnet.com/">Amnet Systems</a>, and <a href="https://cloud68.co/">Cloud68</a>. author: john Lingo -tags: - - blog +tags: + - kotahi + - something + - something else --- @@ -13,7 +15,7 @@ tags: <p>Kotahi solves many of our current publishing platform limitations and we are really excited about its features. Like Aperture, a community driven open access publishing platform, Kotahi is also community driven. </p> -> we are really excited about its features +## we are really excited about its features <p>To learn more about this new partnership visit the <a href="https://www.humanbrainmapping.org/i4a/pages/index.cfm?pageid=4081" target="_blank">Aperture Booth in the Exhibitor Hall</a> during the <a href="http://www.humanbrainmapping.org/i4a/pages/index.cfm?pageid=4054" target="_blank">OHBM 2021 Annual Meeting</a> Exhibitor Hours. Our Journal Manager, Kay Vanda, will be staffing the booth and running demos during select scheduled hours. We hope to see you virtually!</p> diff --git a/src/blog/post/entry2.md b/src/blog/posts/entry2.md similarity index 86% rename from src/blog/post/entry2.md rename to src/blog/posts/entry2.md index bc2a7a32b43505a484873b2126f314575746f982..760b7a15e897161c1b45877fd5579f90a4d0aa58 100644 --- a/src/blog/post/entry2.md +++ b/src/blog/posts/entry2.md @@ -1,8 +1,7 @@ --- title: Ag test date: 2021-06-20 -layout: blogpost.njk -author: john Lingo +author: john Lango Sr tags: - blog --- diff --git a/src/blog/posts/posts.json b/src/blog/posts/posts.json new file mode 100644 index 0000000000000000000000000000000000000000..e6613435f491525e7bff6d7d24caf0cdec9dac4e --- /dev/null +++ b/src/blog/posts/posts.json @@ -0,0 +1,5 @@ +{ + "author": "Coko", + "layout": "blogpost.njk", + "permalink": "/blog/{{title | slugify}}.html" +} \ No newline at end of file diff --git a/src/index.md b/src/index.md deleted file mode 100644 index 7ac2b9f0bd3dda1330444c9eeb5a7ee8659fa9df..0000000000000000000000000000000000000000 --- a/src/index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Homepage -permalink: /index.html -layout: home.njk -class: home -heading: We build, you publish. -chapeau: Brief general presentation. The Coko team and community has built over a dozen highly successful publishing platforms – making us the most experienced folks in the business. ---- diff --git a/src/layouts/article.njk b/src/layouts/article.njk new file mode 100644 index 0000000000000000000000000000000000000000..53283ffbbc16a5ab3a6db7ca7675ed4191d9706e --- /dev/null +++ b/src/layouts/article.njk @@ -0,0 +1,42 @@ +{% extends "base.njk" %} + +{% block bodyclass %}article{% endblock %} + +{% block content %} + + <main> + {# <header> + <h1>{{title}}</h1> + </header> #} + + <article class="post-content"> + <header> + <h1>{{title}}</h1> + <time>{{date | postDate}}</time> + {% if intro %} + <section class="intro">{{intro | markdownify | safe }}</section> + {% endif %} + </header> + + <section class="content"> + {{ content | safe }} + </section> + </article> + {% set previousPost = collections.articles | getPreviousCollectionItem(page) %} + {% set nextPost = collections.articles | getNextCollectionItem(page) %} + + <aside class="paginator + {% if previousPost and nextPost %} both {% endif %}"> + + {% if previousPost %} + <a class="previous" href="{{ previousPost.url }}">{{ previousPost.data.title }}</a> + {% endif %} + {% if nextPost %} + <a class="next" href="{{ nextPost.url }}">{{ nextPost.data.title }}</a> + {% endif %} + {# <a class="next" href="https://www.pagedjs.org/search/">Looking for something?</a> + <a class="next" href="https://www.pagedjs.org/search/">Looking for something?</a> #} + </aside> + </main> + +{% endblock %} \ No newline at end of file diff --git a/src/layouts/articles-index.njk b/src/layouts/articles-index.njk new file mode 100644 index 0000000000000000000000000000000000000000..9dc005455bce5e010d1d65ec7fc516f89ed970d8 --- /dev/null +++ b/src/layouts/articles-index.njk @@ -0,0 +1,40 @@ +{% extends "base.njk" %} + +{% block content %} + <main> + + <header> + <h1>{{title}}</h1> + + {{ content | safe }} + </header> + + {% for item in collections.articles -%} + <article class="item"> + <header> + <p class="meta"> + <time datetime="{{item.date}}">{{item.data.date | itemDate}}</time> + <span class="tags"> + {% for tag in tags %} + <span>#{{tag}}</span> + {% endfor %} + </div> + </span> + <h2 id="{{item.data.title | slug}}">{{item.data.title}}</h2> + {% if item.data.author %} + <p class="author">Written by {{ item.data.author }}</p> + {% endif %} + + </header> + + <section class="content"> + + <section> + {{ item.data.content | safe }} + </section> + </section> + </article> + {%- endfor %} + + </main> +{% endblock %} \ No newline at end of file diff --git a/src/layouts/base.njk b/src/layouts/base.njk index c4e6199fc3737a6b59b0a38da033399f0aa6ab5a..bdb45c04a70707aa7be13e4b2100697c56a7a096 100644 --- a/src/layouts/base.njk +++ b/src/layouts/base.njk @@ -107,13 +107,15 @@ <header> <h1>{{heading}}</h1> <section class="intro"> - <h2>{{chapeau}}</h2> + <p>{{chapeau}}</p> </section> </header> {% endblock %} {% block content %} + <article> {{content | safe}} + </article> {% endblock %} </main> diff --git a/src/layouts/blogpost.njk b/src/layouts/blogpost.njk index b695d0c56a8dbe4cb3dd75cd8c309ac27ab0da9b..a465574f7e6f27df530daa292d5bfc33f0ee4d4d 100644 --- a/src/layouts/blogpost.njk +++ b/src/layouts/blogpost.njk @@ -9,9 +9,36 @@ <h1>{{title}}</h1> </header> #} - <section class="chap-content"> - {{ content | safe }} - </section> + <article class="post-content"> + <header> + <h1>{{title}}</h1> + <time>{{date | postDate}}</time> + {% if intro %} + <section class="intro">{{intro | markdownify | safe }}</section> + {% endif %} + </header> + + <section class="content"> + {{ content | safe }} + </section> + </article> + + {# nextprevious #} + {% set previousPost = collections.blog | getPreviousCollectionItem(page) %} + {% set nextPost = collections.blog | getNextCollectionItem(page) %} + + <aside class="paginator + {% if previousPost and nextPost %} both {% endif %}"> + + {% if previousPost %} + <a class="previous" href="{{ previousPost.url }}">{{ previousPost.data.title }}</a> + {% endif %} + {% if nextPost %} + <a class="next" href="{{ nextPost.url }}">{{ nextPost.data.title }}</a> + {% endif %} + {# <a class="next" href="https://www.pagedjs.org/search/">Looking for something?</a> + <a class="next" href="https://www.pagedjs.org/search/">Looking for something?</a> #} + </aside> </main> {% endblock %} \ No newline at end of file diff --git a/src/layouts/home.njk b/src/layouts/home.njk index 441e2d649de422660ee33e7ab7228874e16c20fa..34fde34470a904f7ea9aaa3e83cd26ba35cd5586 100644 --- a/src/layouts/home.njk +++ b/src/layouts/home.njk @@ -6,41 +6,28 @@ {% endif %} {% endblock %} +{% block content %} + <section class="section-latest"> + <h2 class="section-title">Latest articles</h2> - {% block content %} + </section> - <section class="section-latest"> - <h2 class="section-title">Latest articles</h2> + <section class="section-blog"> + <h2 class="section-title">Latest from the blog</h2> + {% for article in collections.blog %} - {{collections.articles | log}} + <article class="posts"> + <h3><a href="{{article.url}}">{{article.data.title}}</a></h3> + {% if article.data.intro %} + {{article.data.intro | markdownify | safe }} + {% endif %} - {% for article in collections.articleQuery %} + {# {{article.templateContent | markdownify | safe}} #} + </article> + {% endfor %} + </section> - <article class="post"> - <h3>{{article.title}}</h3> - <section class="metadata"> - <ul> - <li>Author: {{article.parsedSubmission.name}}</li> - <li>Published: {{article.publishedDate}}</li> - <li>Filename: {{article.files[0].filename}}</li> - <li>Short ID: {{article.shortId}}</li> - <li>Methods: {{article.parsedSubmission.methods}}</li> - <li>Packages: {{article.parsedSubmission.packages}}</li> - </ul> - </section> - - </article> - {% endfor %} - </section> - - - <section class="section-blog"> - <h2 class="section-title">Latest from the blog</h2> - </section> - - -{% endblock %} - +{% endblock %} \ No newline at end of file diff --git a/static/css/layout/one-column.css b/static/css/layout/one-column.css index db9e13a9028edd38450ec9fada766fe76af4fec7..b59e680ef825da556b27422a152c3446caef99d8 100644 --- a/static/css/layout/one-column.css +++ b/static/css/layout/one-column.css @@ -164,7 +164,6 @@ html { .topbar nav { width: 100%; - font-size: .7em; letter-spacing: .15ch; }