### Blog Post Markdown Example Source: https://context7.com/multiverse/multiverse.github.com/llms.txt This Markdown example demonstrates the structure of a blog post, including front matter for metadata and the main content written in Markdown. The front matter specifies the layout, category, header, and author, which are then used by the post layout template. The content includes paragraphs, links, and headings. ```markdown --- layout: post category : news header: FernFerret is Back! author: fernferret --- Hello all! It's been a while, but I'm finally back in action. I needed a little break to venture out into the world. I'll be working through all [250ish issues](https://github.com/multiverse/Multiverse-Core/issues) in the tracker in Core alone. #### re: Lack of Communication This is because a lot of the developers have other things going on right now. I can say a fair number of us have full time jobs... Cheers, --FF ``` -------------------------------- ### Set up Git Repository and Remote for Collaboration Source: https://github.com/multiverse/multiverse.github.com/blob/master/_posts/2011-09-21-credit-where-credits-due.md This snippet demonstrates the initial steps to prepare a local Git repository for collaboration. It involves cloning the central repository, navigating into it, and adding a remote repository for a collaborator. This is essential for fetching and merging changes from external contributors. ```bash git clone git@github.com:Multiverse/Multiverse-Portals.git cd Multiverse-Portals git remote add vibroaxe https://github.com/VibroAxe/Multiverse-Portals.git ``` -------------------------------- ### Heroku Deployment Configuration (Procfile) Source: https://context7.com/multiverse/multiverse.github.com/llms.txt Procfile for deploying the Jekyll site on Heroku. Configures the web server process using the `jekyll` command with specific flags for server mode, port, and disabling LSI and safe mode. ```bash # Procfile web: jekyll --server $PORT --no-lsi --safe --pygments # Run locally with: foreman start ``` -------------------------------- ### Jekyll Front Matter and Templating (Liquid) Source: https://github.com/multiverse/multiverse.github.com/blob/master/_layouts/post.html This snippet demonstrates Jekyll's front matter and Liquid templating syntax. It defines page metadata like header, author, and date, and uses Liquid tags to conditionally display content and navigation links. This is typical for structuring content on GitHub Pages. ```liquid --- layout: default --- {{ page.header }}{%if page.author %} by [{{page.author}}]({{ "http://www.github.com/" + page.author }}){% endif %} ============================================================================================================= #### {{ page.date | date: "%B %e, %Y" }} * * * {{ content }} * * * {% if page.previous %} {% if page.categories == page.previous.categories %}* [← {{ page.previous.title }}]({{ page.previous.url }}) {% endif %} {% endif %} {% if page.next %} {% if page.categories == page.next.categories %}* [{{ page.next.title }} →]({{ page.next.url }}) {% endif %} {% endif %} ``` -------------------------------- ### Pagination Controls - Liquid Templating Source: https://github.com/multiverse/multiverse.github.com/blob/master/_includes/helpers/paginate.html This snippet generates pagination controls using Liquid templating. It provides links to 'Older' posts if a next page exists and 'Newer' posts if a previous page exists. The 'Newer' link correctly points to the root path for the first page. ```liquid {% if paginator.next_page %}* [← Older](/page{{paginator.next_page}}) {% endif %} {% if paginator.previous_page %}* {% if paginator.previous_page == 1 %} [Newer →](/) {% else %} [Newer →](/page{{paginator.previous_page}}) {% endif %} {% endif %} ``` -------------------------------- ### Iterate and Display Blog Posts - Liquid Templating Source: https://github.com/multiverse/multiverse.github.com/blob/master/_includes/helpers/paginate.html This snippet iterates through a collection of posts using Liquid templating. It displays the post title, URL, date, and author if available. The content is truncated based on a 'limit' attribute or a default value. It also includes a 'Read More' link if the content is truncated. ```liquid {% for post in paginator.posts %} ### [{{ post.title }}]({{ post.url }}) {{ post.date | date: "%B %e, %Y" }}{%if post.author %} by [{{ post.author }}](http://www.github.com/{{ post.author }}){% endif %} {% if post.limit %} {{ post.content | truncatewords:post.limit }} {% else %} {{ post.content | truncatewords:150 }} {% endif %} {% capture text %}{{ post.content | strip_html }}{% endcapture %} {% capture truncated_text %}{{ text | truncatewords: 150 }}{% endcapture %} {% if text != truncated_text %} [Read More]({{ post.url }}) {% endif %} {% unless forloop.last %} * * * {% endunless %} {% endfor %} ``` -------------------------------- ### Paginated Post Display (_includes/helpers/paginate.html) Source: https://context7.com/multiverse/multiverse.github.com/llms.txt Liquid template include for displaying paginated blog posts. It iterates through `paginator.posts`, displays the title, date, author (if available), and a truncated content excerpt. Includes navigation links for older and newer posts. ```liquid {% comment %}_includes/helpers/paginate.html{% endcomment %} {% for post in paginator.posts %}
{% if post.limit %} {{ post.content | truncatewords:post.limit }} {% else %} {{ post.content | truncatewords:150 }} {% endif %} {% capture text %}{{ post.content | strip_html }}{% endcapture %} {% capture truncated_text %}{{ text | truncatewords: 150 }}{% endcapture %} {% if text != truncated_text %}
{% endif %} {% unless forloop.last %}
```
--------------------------------
### Fetch and Checkout Collaborator's Commits
Source: https://github.com/multiverse/multiverse.github.com/blob/master/_posts/2011-09-21-credit-where-credits-due.md
This sequence of Git commands allows you to retrieve commits from a collaborator's repository and work on them locally. It involves fetching the remote repository's data and then creating a new local branch based on the collaborator's master branch. This prepares the fetched code for integration and modification.
```bash
git fetch vibroaxe
git checkout -b vibroaxe-cooldowns vibroaxe/master
```
--------------------------------
### List Jekyll Pages by Category (Jekyll/Liquid)
Source: https://github.com/multiverse/multiverse.github.com/blob/master/_posts/2012-10-20-taming-jekyll.md
This snippet demonstrates how to list Jekyll pages belonging to a specific category using Liquid templating. It iterates through a list of pages and checks if their group matches the specified category. It also handles highlighting the currently active page.
```jinja
{% literal %}
{% for node in pages_list %}
{% if group == null or group == node.group %}
{% if page.url == node.url %}
` tags. Requires the `pp` library.
```ruby
# _plugins/debug.rb - Usage in any template
# Usage in templates:
# {{ site | debug }}
# {{ site.posts | debug }}
# {{ page | debug }}
# Implementation
require 'pp'
module Jekyll
module DebugFilter
def debug(obj, stdout=false)
puts obj.pretty_inspect if stdout
"#{obj.class}\n#{obj.pretty_inspect}"
end
end
end
Liquid::Template.register_filter(Jekyll::DebugFilter)
```
--------------------------------
### Rebase and Squash Commits for a Single Commit
Source: https://github.com/multiverse/multiverse.github.com/blob/master/_posts/2011-09-21-credit-where-credits-due.md
This Git command initiates an interactive rebase, allowing you to modify commit history. By picking the initial commit and squashing subsequent commits, you can consolidate multiple changes into a single commit. This is crucial for cleaning up history and preparing for a clean merge, especially when addressing issues like tabbing.
```bash
git rebase -i master
```
--------------------------------
### Push Combined Commit to Origin Master
Source: https://github.com/multiverse/multiverse.github.com/blob/master/_posts/2011-09-21-credit-where-credits-due.md
After rebasing and squashing commits to create a single, unified commit that incorporates all necessary changes and fixes, this command pushes the modified branch to the central repository. This action updates the main branch with the consolidated work, ensuring proper attribution.
```bash
git push origin master
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.