Skip to content

Commit

Permalink
Update documentation template
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsisk committed Jun 5, 2018
1 parent 5a39344 commit 2fad700
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 83 deletions.
24 changes: 24 additions & 0 deletions docs/_data/navigation.json
@@ -0,0 +1,24 @@
{
"Welcome to Webcomic": "Welcome-to-Webcomic",
"Publishing a Comic": "Publishing-a-Comic",
"Integrating Your Comic": "Integrating-Your-Comic",
"Customizing Your Comic": "Customizing-Your-Comic",
"Doing More with Your Comic": "Doing-More-with-Your-Comic",
"Components": {
"Alert": "Alert",
"Character": "Taxonomies",
"Commerce": "Commerce",
"Compat": "Compat",
"Restrict": "Restrict",
"Storyline": "Taxonomies",
"Transcribe": "Transcribe",
"Twitter": "Twitter"
},
"API": {
"Actions": "Actions",
"Filters": "Filters",
"Shortcodes": "Shortcodes",
"Template Tags": "Template-Tags",
"Widgets": "Widgets"
}
}
1 change: 0 additions & 1 deletion docs/_data/projects.yml

This file was deleted.

26 changes: 0 additions & 26 deletions docs/_data/sections.json

This file was deleted.

12 changes: 12 additions & 0 deletions docs/_includes/complementary.md
@@ -0,0 +1,12 @@
[Get Webcomic][]{:.button}
[More Info][]{:.button}

**If you like Webcomic, please consider donating to it's ongoing development.**
It takes a lot of time and effort to support a project like Webcomic, and it's
much easier to justify that time with feedback and support from patrons.

[Support Webcomic][]{:.button}

[Get Webcomic]: https://wordpress.org/plugins/webcomic
[More Info]: https://github.com/mgsisk/webcomic/blob/master/support.md
[Support Webcomic]: /
92 changes: 36 additions & 56 deletions docs/_layouts/default.html
Expand Up @@ -2,74 +2,54 @@
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta name="author" content="{{page.author.name}}">
<meta name="description" property="og:description" content="{{page.excerpt | replace: 'site.description', site.description | strip_html | truncate: 160 | smartify}}">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
<meta name="twitter:creator" content="@{{page.author.twitter}}">
<meta name="author" content="Michael Sisk">
<meta name="description" property="og:description" content="{{ page.excerpt | replace: 'site.description', site.description | strip_html | truncate: 160 | smartify }}">
<meta name="viewport" content="initial-scale=1,minimum-scale=1,width=device-width">
<meta name="twitter:creator" content="@mgsisk">
<meta name="twitter:card" content="summary">
<meta property="og:type" content="website">
<meta property="og:site_name" content="{{site.title | remove: '\' | smartify}}">
<meta property="og:title" content="{{page.title | strip | remove: '\' | smartify}}">
<meta property="og:image" content="{{site.url}}{{site.baseurl}}/srv/{{page.image}}">
<meta property="og:url" content="{{site.url}}{{site.baseurl}}{{page.url | remove: '/index.html'}}">
<title>{{page.title | strip | remove: '\' | smartify}} / {{site.title}}</title>
<link rel="canonical" href="{{site.url}}{{site.baseurl}}{{page.url | remove: '/index.html'}}">
<link rel="icon" href="{{site.baseurl}}/srv/icon.jpg">
<meta property="og:site_name" content="{{ site.title | remove: '\' | smartify }}">
<meta property="og:title" content="{{ page.title | strip | remove: '\' | smartify }}">
<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/srv/{{ page.image }}">
<meta property="og:url" content="{{ site.url }}{{site.baseurl }}{{ page.url | remove: '/index.html' }}">
<title>{{ page.title | strip | remove: '\' | smartify }} / {{ site.title }}</title>
<link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url | remove: '/index.html' }}">
<link rel="icon" href="{{ site.baseurl }}/srv/icon.png">
<link rel="stylesheet" href="https://use.typekit.net/hne7oit.css">
<link rel="stylesheet" href="/srv/style.css">
<link rel="stylesheet" href="{{site.baseurl}}/srv/colors.css">
<script src="https://use.typekit.net/hne7oit.js"></script>
<script>try{Typekit.load({async:true});}catch(e){}</script>
<link rel="stylesheet" href="{{ site.baseurl }}/srv/colors.css">
</head>
<body id="top">
<a href="#nav">Skip to menu</a>
<header>
{{page.title | prepend: '# ' | markdownify}}
<header role="banner">
{{ page.title | prepend: '# ' | markdownify }}
</header>
<main>
{{content}}
{{ content }}
</main>
{%- if page.aside -%}
<aside>
{%- capture aside -%}{%- include {{ page.aside }} -%}{%- endcapture -%}
{{ aside | markdownify }}
</aside>
{%- endif -%}
<nav id="nav">
<a href="/">{{site.url | remove: 'http://' | remove: 'https://'}}</a>
{%if site.data.projects%}
<label>
<span>Projects</span>
<select data-root="{{site.url}}">
{%if page.title == 'File Not Found'%}<option>error</option>{%endif%}
<option></option>
{%for project in site.data.projects%}
{% assign baseurl = '/' | append: project %}
<option{%if baseurl == site.baseurl%} selected{%endif%}>{{project}}</option>
{%endfor%}
</select>
</label>
{%endif%}
{%if page.title != 'File Not Found' and site.baseurl != ''%}
<label>
<span>Sections</span>
<select data-root="{{site.url}}{{site.baseurl}}">
<option></option>
{%for section in site.data.sections%}
{%if section[0] == '_'%}
{%for subsection in section[1]%}
<option value="{{subsection | replace: ' ', '-'}}"{%if subsection == page.title%} selected{%endif%}>{{subsection}}</option>
{%endfor%}
{%else%}
<optgroup label="{{section[0]}}">
{%for subsection in section[1]%}
<option value="{{subsection | replace: ' ', '-'}}"{%if subsection == page.title%} selected{%endif%}>{{subsection}}</option>
{%endfor%}
</optgroup>
{%endif%}
{%endfor%}
</select>
</label>
{%endif%}
</nav>
<a href="{{ site.baseurl }}/"{% if page.title == 'Webcomic' %} class="active"{%- endif -%}>Home</a><br>
{%- for item in site.data.navigation -%}
{%- capture itemCheck -%}{{ item[1] | replace: '{', '' }}{%- endcapture -%}
{%- if item[1] == itemCheck -%}
<a href="{{ item[1] }}"{% if item[0] == page.title %} class="active"{%- endif -%}>{{ item[0] }}</a><br>
{%- else -%}
<h2>{{ item[0] }}</h2>
{%- for link in item[1] -%}
<a href="{{ link[1] }}"{% if link[0] == page.title %} class="active"{%- endif -%}>{{ link[0] }}</a><br>
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
</nav>
<a href="#top">Back to top</a>
<footer>
<a href="#top">© {{site.time | date: '%Y'}} {{page.author.name}}</a>
© {{ site.time | date: '%Y' }} Michael Sisk
</footer>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create','UA-78610910-1','auto');ga('send','pageview')</script>
<script src="/srv/script.js" async></script>
</body>
</html>

0 comments on commit 2fad700

Please sign in to comment.