cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzn...@apache.org
Subject svn commit: r1836533 - in /cassandra/site/src: README _config.yml _includes/footer.html _includes/nav.html _layouts/blog.html _layouts/post.html _templates/ _templates/2018-06-22-blog_post_template.markdown blog/ blog/index.html css/style.scss
Date Tue, 24 Jul 2018 08:18:18 GMT
Author: zznate
Date: Tue Jul 24 08:18:17 2018
New Revision: 1836533

URL: http://svn.apache.org/viewvc?rev=1836533&view=rev
Log:
CASSANDRA-14552 - Adding blog support patch from cscotta

Added:
    cassandra/site/src/_layouts/blog.html
    cassandra/site/src/_layouts/post.html
    cassandra/site/src/_templates/
    cassandra/site/src/_templates/2018-06-22-blog_post_template.markdown
    cassandra/site/src/blog/
    cassandra/site/src/blog/index.html
Modified:
    cassandra/site/src/README
    cassandra/site/src/_config.yml
    cassandra/site/src/_includes/footer.html
    cassandra/site/src/_includes/nav.html
    cassandra/site/src/css/style.scss

Modified: cassandra/site/src/README
URL: http://svn.apache.org/viewvc/cassandra/site/src/README?rev=1836533&r1=1836532&r2=1836533&view=diff
==============================================================================
--- cassandra/site/src/README (original)
+++ cassandra/site/src/README Tue Jul 24 08:18:17 2018
@@ -24,12 +24,12 @@ rbenv install 2.4.2
 
 # Associate with Cassandra svn directory
 cd ~/svn/cassandra-site # change as needed
-rbenv local 2.4.1
+rbenv local 2.4.2
 which rbenv # should point to shim
 ruby --version
 
 # Install jekyll with local rbenv version
-gem install jekyll -v 3.4.3
+gem install jekyll:3.4.3 jekyll-paginate-v2
 jekyll --version
 
 
@@ -117,3 +117,13 @@ And that's mostly what there is to it. I
    any such directory when generated its result. In practice, this means we have to force
manually force the inclusion
    of those sphinx directories we want to include so Jekyll doesn't skip them, which is done
in the _config.yml Jekyll
    configuration file (the only sphinx dir we care about so far is _images).
+
+Contributing a Blog Post
+------------------------
+To contribute a new blog post, create a new Markdown file in /_posts, using
+_templates/2018-06-22-blog_post_template.markdown as a template. Follow the YYYY-MM-DD-blog-post-slug.markdown
filename
+convention, and annotate your post using the yaml frontmatter of the Markdown file (this
functionality is provided by
+Jekyll).
+
+Follow the instructions above during development -- `make serve` for local development, and
`make` to generate the final
+product.
\ No newline at end of file

Modified: cassandra/site/src/_config.yml
URL: http://svn.apache.org/viewvc/cassandra/site/src/_config.yml?rev=1836533&r1=1836532&r2=1836533&view=diff
==============================================================================
--- cassandra/site/src/_config.yml (original)
+++ cassandra/site/src/_config.yml Tue Jul 24 08:18:17 2018
@@ -19,6 +19,8 @@ exclude: [ Makefile, README ]
 include:
   - _images
 
+gems:
+  - jekyll-paginate-v2
 
 # Build settings
 markdown: kramdown
@@ -27,3 +29,12 @@ kramdown:
   input: GFM
   syntax_highlighter: rouge
   hard_wrap: false
+
+# Pagination threshold for blog post listings
+pagination:
+  enabled: true
+  per_page: 5
+  title: ' - page :num'
+  limit: 0
+  sort_field: 'date'
+  sort_reverse: true

Modified: cassandra/site/src/_includes/footer.html
URL: http://svn.apache.org/viewvc/cassandra/site/src/_includes/footer.html?rev=1836533&r1=1836532&r2=1836533&view=diff
==============================================================================
--- cassandra/site/src/_includes/footer.html (original)
+++ cassandra/site/src/_includes/footer.html Tue Jul 24 08:18:17 2018
@@ -1,3 +1,5 @@
+<hr />
+
 <footer>
   <div class="container">
     <div class="col-md-4 social-blk">

Modified: cassandra/site/src/_includes/nav.html
URL: http://svn.apache.org/viewvc/cassandra/site/src/_includes/nav.html?rev=1836533&r1=1836532&r2=1836533&view=diff
==============================================================================
--- cassandra/site/src/_includes/nav.html (original)
+++ cassandra/site/src/_includes/nav.html Tue Jul 24 08:18:17 2018
@@ -59,6 +59,7 @@
           <li><a href="{{ base }}download/">Download</a></li>
           <li><a href="{{ base }}doc/">Documentation</a></li>
           <li><a href="{{ base }}community/">Community</a></li>
+          <!--<li><a href="{{ base }}blog">Blog</a></li>-->
         </ul>
       </div><!-- /#cassandra-menu -->
 

Added: cassandra/site/src/_layouts/blog.html
URL: http://svn.apache.org/viewvc/cassandra/site/src/_layouts/blog.html?rev=1836533&view=auto
==============================================================================
--- cassandra/site/src/_layouts/blog.html (added)
+++ cassandra/site/src/_layouts/blog.html Tue Jul 24 08:18:17 2018
@@ -0,0 +1,33 @@
+---
+layout: default
+---
+<div class="content">
+  <div class="container">
+    {{ content }}
+    <ul class="blog-post-listing">
+      {% for post in paginator.posts %}
+        <li class="blog-post">
+          <h4><a href="{{ post.url }}">{{ post.title }}</a></h4>
+          <p>Posted on {{ post.date | date: '%B %d, %Y' }} by {{ post.author }}</p>
+          {{ post.excerpt }}
+          <h5><a href="{{ post.url }}">Read more &raquo;</a></h5>
+        </li>
+      {% endfor %}
+    </ul>
+
+  {% if paginator.total_pages > 1 %}
+  <ul class="pager">
+    {% if paginator.previous_page %}
+    <li class="previous">
+      <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//',
'/' }}">&larr; Newer Posts</a>
+    </li>
+    {% endif %}
+    {% if paginator.next_page %}
+    <li class="next">
+      <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/'
}}">Older Posts &rarr;</a>
+    </li>
+    {% endif %}
+  </ul>
+  {% endif %}    
+  </div>
+</div>

Added: cassandra/site/src/_layouts/post.html
URL: http://svn.apache.org/viewvc/cassandra/site/src/_layouts/post.html?rev=1836533&view=auto
==============================================================================
--- cassandra/site/src/_layouts/post.html (added)
+++ cassandra/site/src/_layouts/post.html Tue Jul 24 08:18:17 2018
@@ -0,0 +1,12 @@
+---
+layout: default
+---
+<div class="content">
+  <div class="container">
+  <h2>{{ page.title }}</h2>
+    <p>Posted on {{ page.date | date: '%B %d, %Y' }} by {{ page.author }}</p>
+    <h5><a href="/blog">&laquo; Back to the Apache Cassandra Blog</a></h5>
+    <hr />
+  {{ content }}
+  </div>
+</div>

Added: cassandra/site/src/_templates/2018-06-22-blog_post_template.markdown
URL: http://svn.apache.org/viewvc/cassandra/site/src/_templates/2018-06-22-blog_post_template.markdown?rev=1836533&view=auto
==============================================================================
--- cassandra/site/src/_templates/2018-06-22-blog_post_template.markdown (added)
+++ cassandra/site/src/_templates/2018-06-22-blog_post_template.markdown Tue Jul 24 08:18:17
2018
@@ -0,0 +1,33 @@
+---
+layout: post
+title: "Lorem ipsum dolor sit amet: consectetur adipiscing elit"
+date:   2018-06-05 20:00:00 -0700
+author: the Apache Cassandra Community
+categories: blog
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel hendrerit nisi, pellentesque
placerat magna. Sed et placerat erat. Duis nec ex a dui ullamcorper hendrerit eget id dui.
Pellentesque eget varius tortor. Nullam non nisi interdum, consectetur neque nec, interdum
augue. Fusce vitae facilisis urna. Donec iaculis sapien sed gravida laoreet. Donec convallis
enim non lacus blandit commodo. Nullam viverra risus et lorem aliquam, ac tincidunt justo
finibus. Morbi a felis ac justo fringilla porttitor. Pellentesque habitant morbi tristique
senectus et netus et malesuada fames ac turpis egestas. Mauris faucibus est ante, eu luctus
tortor egestas in. Aliquam erat volutpat.
+
+Ut imperdiet euismod sollicitudin:
+
+#### Nunc at semper tellus
+##### Vel pharetra lectus
+
+Vestibulum ut neque accumsan, placerat felis fermentum, tempor lacus. Suspendisse hendrerit
lacus a risus commodo, quis pulvinar ipsum dictum. Integer auctor, tortor non sollicitudin
iaculis, justo lacus dignissim tellus, in posuere massa metus vitae turpis. Maecenas vel turpis
quis nulla maximus pretium ornare ultricies enim. Nam tristique velit sed lorem malesuada,
ut rutrum libero maximus. Etiam interdum erat id nisl facilisis imperdiet ac at orci. Quisque
quis porttitor neque. Pellentesque elit neque, viverra vel congue in, ullamcorper in felis.
Nunc dignissim tellus et felis porta pellentesque.
+
+
+---
+
+#### Aliquam orci orci, sodales eget justo sit amet
+##### Nunc rhoncus massa
+
+Suspendisse blandit nunc vitae commodo pretium. Interdum et malesuada fames ac ante ipsum
primis in faucibus. Pellentesque pharetra, nisi convallis blandit molestie, quam enim sodales
nisl, ac suscipit diam lectus at justo. Curabitur at dignissim enim, eu pellentesque nisi.
Nulla facilisi. Cras eget blandit felis, non tincidunt risus. Ut eleifend nisi in felis lacinia,
quis volutpat odio sagittis.
+
+Vivamus tincidunt efficitur quam ac tempor. Proin varius vel ex tincidunt placerat.
+
+---
+
+#### Mauris dapibus mauris eget tortor interdum
+##### Et congue lacus rutrum
+Suspendisse ac dignissim diam. Donec rutrum nisi nec vestibulum congue. Ut placerat sodales
turpis, at tincidunt tortor scelerisque consequat. Nullam ac neque rutrum, malesuada ex vel,
pharetra turpis. Donec nisl justo, viverra at blandit a, dignissim in est. Quisque et varius
lacus. Suspendisse placerat laoreet felis id elementum. Nunc ut magna laoreet odio faucibus
faucibus sit amet ac dolor. Nam ac tortor tellus. Mauris scelerisque magna urna, nec aliquam
est pharetra eu. Curabitur vitae mauris dictum, tempor nisl et, vestibulum velit.
+

Added: cassandra/site/src/blog/index.html
URL: http://svn.apache.org/viewvc/cassandra/site/src/blog/index.html?rev=1836533&view=auto
==============================================================================
--- cassandra/site/src/blog/index.html (added)
+++ cassandra/site/src/blog/index.html Tue Jul 24 08:18:17 2018
@@ -0,0 +1,11 @@
+---
+layout: blog
+title: "Blog"
+is_homepage: false
+pagination: 
+  enabled: true
+---
+
+<h2>Apache Cassandra Blog</h2>
+<p>Have something to share with the community? Let us know on the <a href="http://cassandra.apache.org/community/#mailing">mailing
list</a>!</p>
+

Modified: cassandra/site/src/css/style.scss
URL: http://svn.apache.org/viewvc/cassandra/site/src/css/style.scss?rev=1836533&r1=1836532&r2=1836533&view=diff
==============================================================================
--- cassandra/site/src/css/style.scss (original)
+++ cassandra/site/src/css/style.scss Tue Jul 24 08:18:17 2018
@@ -68,4 +68,11 @@ body {
   }
 }
 
+ul.blog-post-listing {
+  list-style: none;
+  padding-left: 0;
+}
 
+li.blog-post {
+  padding-bottom: 20px;
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message