generated from mmistakes/mm-github-pages-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Wiki support, more to come (hidden for now)
- Loading branch information
1 parent
11a42f3
commit 4547958
Showing
8 changed files
with
356 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% case site.category_archive.type %} | ||
{% when "liquid" %} | ||
{% assign path_type = "#" %} | ||
{% when "jekyll-archives" %} | ||
{% assign path_type = nil %} | ||
{% endcase %} | ||
|
||
{% if page.collection != 'posts' %} | ||
{% assign path_type = nil %} | ||
{% assign crumb_path = '/' %} | ||
{% else %} | ||
{% assign crumb_path = site.category_archive.path %} | ||
{% endif %} | ||
|
||
<nav class="breadcrumbs"> | ||
<ol itemscope itemtype="https://schema.org/BreadcrumbList"> | ||
{% assign crumbs = page.url | split: '/' %} | ||
{% assign i = 1 %} | ||
{% assign path = '' %} | ||
{% for crumb in crumbs offset: 1 %} | ||
{% if forloop.first %} | ||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> | ||
<a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ | ||
site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a> | ||
|
||
<meta itemprop="position" content="{{ i }}" /> | ||
</li> | ||
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span> | ||
{% endif %} | ||
{% if forloop.last %} | ||
<li class="current" {% if page.locale %} lang="{{ page.locale }}" {% endif %}>{{ page.title }}</li> | ||
{% else %} | ||
{% assign i = i | plus: 1 %} | ||
|
||
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> | ||
<a href="{{ crumb | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | prepend: path | relative_url }}" | ||
itemprop="item"><span itemprop="name">{{ crumb | url_decode | replace: '-', ' ' | capitalize | ||
}}</span></a> | ||
<meta itemprop="position" content="{{ i }}" /> | ||
</li> | ||
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span> | ||
{% assign path = path | append: '/' | append: crumb %} | ||
{% endif %} | ||
{% endfor %} | ||
</ol> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% if page.author_profile or layout.author_profile or page.sidebar or page.sidebar_include %} | ||
<div class="sidebar sticky"> | ||
{% if page.author_profile or layout.author_profile %}{% include author-profile.html %}{% endif %} | ||
{% if page.sidebar %} | ||
{% for s in page.sidebar %} | ||
{% if s.image %} | ||
<img src="{{ s.image | relative_url }}" alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}"> | ||
{% endif %} | ||
{% if s.title %}<h3>{{ s.title }}</h3>{% endif %} | ||
{% if s.text %}{{ s.text | markdownify }}{% endif %} | ||
{% if s.nav %}{% include nav_list nav=s.nav %}{% endif %} | ||
{% endfor %} | ||
{% if page.sidebar.nav %} | ||
{% include nav_list nav=page.sidebar.nav %} | ||
{% endif %} | ||
{% endif %} | ||
{% if page.sidebar_include %} | ||
{% include {{ page.sidebar_include }} %} | ||
{% endif %} | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<nav class="nav__list"> | ||
<input id="ac-toc" name="accordion-toc" type="checkbox" /> | ||
<label for="ac-toc">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</label> | ||
|
||
{% assign navurl = page.url | remove: 'index.html' %} | ||
{% assign pages = site.wiki %} | ||
<ul class="nav__items"> | ||
{% for item in pages %} | ||
<li> | ||
{% assign level = item.url | remove: '/index.html' | split: '/' | size | minus:3 %} | ||
|
||
<span {% if level==0 %}class="nav__sub-title" {% endif %}> | ||
|
||
{% if level >= 0 and level <= 2 %} <a href="{{ item.url | relative_url }}" | ||
style="margin-left: {{ level | times:0.7}}em; padding-inline: 0px; font-size:0.85em;" {% if | ||
item.url==navurl %} class="active" {% endif %}> | ||
{% if item.navtitle %} | ||
{{item.navtitle}} | ||
{% else %} | ||
{{ item.title }} | ||
{% endif %} | ||
</a> | ||
{% endif %} | ||
</span> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} | ||
{% include page__hero.html %} | ||
{% elsif page.header.video.id and page.header.video.provider %} | ||
{% include page__hero_video.html %} | ||
{% endif %} | ||
|
||
{% assign breadcrumbs_enabled = site.breadcrumbs %} | ||
{% if page.breadcrumbs != null %} | ||
{% assign breadcrumbs_enabled = page.breadcrumbs %} | ||
{% endif %} | ||
{% if page.url != "/" and breadcrumbs_enabled %} | ||
{% unless paginator %} | ||
{% include breadcrumbs.html %} | ||
{% endunless %} | ||
{% endif %} | ||
|
||
<div id="main" role="main"> | ||
{% include sidebar.html %} | ||
|
||
<article class="page" itemscope itemtype="https://schema.org/CreativeWork" {% if page.locale %} | ||
lang="{{ page.locale }}" {% endif %}> | ||
{% if page.title %} | ||
<meta itemprop="headline" | ||
content="{{ page.title | replace: '|', '|' | markdownify | strip_html | strip_newlines | escape_once }}"> | ||
{% endif %} | ||
{% if page.excerpt %} | ||
<meta itemprop="description" | ||
content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} | ||
{% if page.date %} | ||
<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %} | ||
{% if page.last_modified_at %} | ||
<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %} | ||
|
||
<div class="page__inner-wrap"> | ||
{% unless page.header.overlay_color or page.header.overlay_image %} | ||
<header> | ||
<div class="wiki_edit_link"><a href="#">Edit</a> | ||
</div> | ||
{% if page.title -%} | ||
<h1 id="page-title" class="page__title" itemprop="headline"> | ||
<a href="{{ page.url | absolute_url }}" itemprop="url">{{ page.title | markdownify | remove: "<p>" | | ||
remove: "</p>" }}</a> | ||
</h1> | ||
{%- endif %} | ||
<div class="page__meta" style="padding-bottom: 0.5em;"> | ||
{% include page__date.html %} | ||
{% include page__meta.html %} | ||
</div> | ||
</header> | ||
{% endunless %} | ||
|
||
<section class="page__content" itemprop="text"> | ||
{% if page.toc %} | ||
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}"> | ||
<nav class="toc"> | ||
<header> | ||
<h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ | ||
page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this | ||
page" }}</h4> | ||
</header> | ||
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" | ||
skip_no_ids=true %} | ||
</nav> | ||
</aside> | ||
{% endif %} | ||
{{ content }} | ||
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ | ||
site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %} | ||
</section> | ||
|
||
<footer class="page__meta"> | ||
{% if site.data.ui-text[site.locale].meta_label %} | ||
<h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4> | ||
{% endif %} | ||
{% include page__taxonomy.html %} | ||
|
||
</footer> | ||
|
||
</div> | ||
|
||
</article> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: Formatting in this Wiki | ||
--- | ||
# Markdown Cheat Sheet | ||
|
||
Thanks for visiting [The Markdown Guide](https://www.markdownguide.org)! | ||
|
||
This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for [basic syntax](https://www.markdownguide.org/basic-syntax/) and [extended syntax](https://www.markdownguide.org/extended-syntax/). | ||
|
||
## Basic Syntax | ||
|
||
These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements. | ||
|
||
### Heading | ||
|
||
# H1 | ||
## H2 | ||
### H3 | ||
|
||
### Bold | ||
|
||
**bold text** | ||
|
||
### Italic | ||
|
||
*italicized text* | ||
|
||
### Blockquote | ||
|
||
> blockquote | ||
|
||
### Ordered List | ||
|
||
1. First item | ||
2. Second item | ||
3. Third item | ||
|
||
### Unordered List | ||
|
||
- First item | ||
- Second item | ||
- Third item | ||
|
||
### Code | ||
|
||
`code` | ||
|
||
### Horizontal Rule | ||
|
||
--- | ||
|
||
### Link | ||
|
||
[Markdown Guide](https://www.markdownguide.org) | ||
|
||
### Image | ||
|
||
![alt text](https://www.markdownguide.org/assets/images/tux.png) | ||
|
||
## Extended Syntax | ||
|
||
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements. | ||
|
||
### Table | ||
|
||
| Syntax | Description | | ||
| ----------- | ----------- | | ||
| Header | Title | | ||
| Paragraph | Text | | ||
|
||
### Fenced Code Block | ||
|
||
``` | ||
{ | ||
"firstName": "John", | ||
"lastName": "Smith", | ||
"age": 25 | ||
} | ||
``` | ||
|
||
### Footnote | ||
|
||
Here's a sentence with a footnote. [^1] | ||
|
||
[^1]: This is the footnote. | ||
|
||
### Heading ID | ||
|
||
### My Great Heading {#custom-id} | ||
|
||
### Definition List | ||
|
||
term | ||
: definition | ||
|
||
### Strikethrough | ||
|
||
~~The world is flat.~~ | ||
|
||
### Task List | ||
|
||
- [x] Write the press release | ||
- [ ] Update the website | ||
- [ ] Contact the media | ||
|
||
### Emoji | ||
|
||
That is so funny! :joy: | ||
|
||
(See also [Copying and Pasting Emoji](https://www.markdownguide.org/extended-syntax/#copying-and-pasting-emoji)) | ||
|
||
### Highlight | ||
|
||
I need to highlight these ==very important words==. | ||
|
||
### Subscript | ||
|
||
H~2~O | ||
|
||
### Superscript | ||
|
||
X^2^ |
Oops, something went wrong.