Use Jekyll collections

pull/732/head
Mattia Iavarone 5 years ago
parent ef9a68ec6a
commit c0dab05063
  1. 2
      docs/_about/changelog.md
  2. 2
      docs/_about/getting-started.md
  3. 2
      docs/_about/install.md
  4. 33
      docs/_config.yml
  5. 2
      docs/_docs/camera-events.md
  6. 2
      docs/_docs/capture-size.md
  7. 2
      docs/_docs/capturing-media.md
  8. 2
      docs/_docs/controls.md
  9. 2
      docs/_docs/debugging.md
  10. 2
      docs/_docs/error-handling.md
  11. 2
      docs/_docs/filters.md
  12. 2
      docs/_docs/frame-processing.md
  13. 2
      docs/_docs/gestures.md
  14. 2
      docs/_docs/metering.md
  15. 2
      docs/_docs/more-features.md
  16. 2
      docs/_docs/preview-size.md
  17. 2
      docs/_docs/previews.md
  18. 2
      docs/_docs/runtime-permissions.md
  19. 2
      docs/_docs/snapshot-size.md
  20. 2
      docs/_docs/watermarks-and-overlays.md
  21. 2
      docs/_extra/contact.md
  22. 2
      docs/_extra/contributing.md
  23. 2
      docs/_extra/donate.md
  24. 2
      docs/_extra/v1-migration-guide.md
  25. 2
      docs/_includes/footer.html
  26. 30
      docs/_includes/navigation.html
  27. 11
      docs/_layouts/landing.html
  28. 0
      docs/_posts/.gitkeep
  29. 0
      docs/home.md

@ -1,8 +1,6 @@
---
layout: page
title: "Changelog"
category: about
date: 2018-12-20 17:49:29
order: 3
---

@ -2,8 +2,6 @@
layout: page
title: "Getting Started"
description: "Simple guide to take your first picture"
category: about
date: 2018-12-20 17:48:58
order: 2
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Install"
description: "Integrate in your project"
category: about
order: 1
date: 2018-12-20 17:47:32
---
The library works on API 15+, which is the only requirement and should be met by most projects nowadays.

@ -14,13 +14,21 @@ github: [metadata] # TODO What's this?
github_repo: CameraView
github_version: 2.6.0
github_branch: master
donateurl: '/extra/donate' # relative URL for donations, used in footer.html
baseurl: '/CameraView' # Keep as an empty string if served up at the root
sections: [
['about', 'Overview'],
['docs', 'Documentation'],
['extra', 'More']
]
collections:
about:
name: Overview
output: true
docs:
name: Documentation
output: true
extra:
name: More
output: true
screenshots:
- 'screen1.png'
- 'screen2.png'
- 'screen3.png'
# Jekyll specific stuff
author:
@ -32,20 +40,7 @@ plugins:
- jekyll-seo-tag # Add SEO tags
permalink: /:categories/:title # Ensure permalinks have no date nor extension
exclude: ['script', 'README.md'] # Exclude non-site files
highlighter: rouge # Syntax highlighting
future: true # What's this?
markdown: kramdown # Use the kramdown Markdown renderer
redcarpet:
extensions: [
'no_intra_emphasis',
'fenced_code_blocks',
'autolink',
'strikethrough',
'superscript',
'with_toc_data',
'tables',
'hardwrap'
]
kramdown:
input: GFM # Use Github Flavored Markdown

@ -2,8 +2,6 @@
layout: page
title: "Camera Events"
description: "Dealing with the camera lifecycle and callbacks"
category: docs
date: 2018-12-20 20:02:08
order: 1
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Capture Size"
description: "Set size of output media"
category: docs
order: 9
date: 2018-12-20 22:07:22
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Capturing Media"
description: "Understanding pictures, videos and the snapshot concept"
category: docs
order: 3
date: 2018-12-20 20:53:17
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Controls"
description: "Configuring output parameters and capture options"
category: docs
order: 2
date: 2018-12-20 21:08:53
disqus: 1
---

@ -1,9 +1,7 @@
---
layout: page
title: "Debugging"
category: docs
order: 15
date: 2018-12-20 20:02:38
disqus: 1
---

@ -1,9 +1,7 @@
---
layout: page
title: "Error Handling"
category: docs
order: 14
date: 2018-12-20 20:02:31
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Real-time Filters"
description: "Apply filters to preview and snapshots"
category: docs
order: 12
date: 2019-08-06 17:10:17
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Frame Processing"
description: "Process each frame in real time"
category: docs
order: 6
date: 2018-12-20 20:45:42
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Gestures"
description: "Gestures control"
category: docs
order: 5
date: 2018-12-20 20:49:35
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Metering"
description: "Exposure and metering controls"
category: docs
order: 4
date: 2019-09-04 19:39:03
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "More features"
description: "Undocumented features & more"
category: docs
order: 16
date: 2018-12-20 20:41:20
disqus: 1
---

@ -1,10 +1,8 @@
---
layout: page
title: "Preview Size"
description: "Measuring behavior"
category: docs
order: 8
date: 2018-12-20 22:07:17
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Engine and Previews"
description: "Camera engine and preview implementations"
category: docs
order: 7
date: 2018-12-20 21:58:16
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Runtime Permissions"
description: "Permissions and Manifest setup"
category: docs
order: 13
date: 2018-12-20 20:03:03
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Snapshot Size"
description: "Sizing the snapshots output"
category: docs
order: 10
date: 2019-02-24 17:36:39
disqus: 1
---

@ -2,9 +2,7 @@
layout: page
title: "Watermarks and Overlays"
description: "Static and animated overlays"
category: docs
order: 11
date: 2019-07-14 20:14:31
disqus: 1
---

@ -1,8 +1,6 @@
---
layout: page
title: "Contact"
category: extra
date: 2018-12-20 19:47:10
order: 4
---

@ -1,8 +1,6 @@
---
layout: page
title: "Contributing & License"
category: extra
date: 2018-12-20 19:28:45
order: 2
---

@ -1,8 +1,6 @@
---
layout: page
title: "Donate"
category: extra
date: 2018-12-21 13:51:39
order: 3
---

@ -2,8 +2,6 @@
layout: page
title: "v1 Migration Guide"
description: "Breaking Changes & new concepts"
category: extra
date: 2018-12-20 19:01:55
order: 1
disqus: 1
---

@ -1,4 +1,4 @@
<footer class="text-center py-3 border-top has-divider">
<span>View on <a href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}">GitHub</a> or become <a href="{{ site.baseurl }}{{ site.donateurl }}">a sponsor</a>!</span>
<span>View on <a href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}">GitHub</a> or become <a href="{{ site.baseurl }}/extra/donate">a sponsor</a>!</span>
<span class="d-block">Made by <a href="{{ site.author.website }}">{{ site.author.name }}</a></span>
</footer>

@ -1,17 +1,18 @@
<ul id="navigation" class="py-4">
<li><a href="{{ site.baseurl }}/home">Home</a></li>
{% for section in site.sections %}
{% assign attr = section[0] %}
{% assign label = section[1] %}
<li class="mt-3"><h5 class="mt-0 mb-1">{{ label }}</h5>
{% for collection in site.collections %}
{% if collection.label != "posts" %}
<li class="mt-3"><h5 class="mt-0 mb-1">{{ collection.name }}</h5>
<ul>
{% for page in site.categories[attr] %}
<li class="pt-2 pb-2" data-order="{{ page.order }}">
<a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a>
{% assign docs = (collection.docs | sort: "order") %}
{% for doc in docs %}
<li class="pt-2 pb-2">
<a href="{{ site.baseurl }}{{ doc.url }}">{{ doc.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
<script>
@ -23,19 +24,4 @@
link.parentElement.classList.add('active')
}
});
/* reorder elements */
const sections = document.querySelectorAll('#navigation ul');
sections.forEach((section) => {
const entries = section.querySelectorAll('li');
const ordered = [];
entries.forEach((entry) => {
const order = entry.getAttribute('data-order');
ordered.push([entry, order]);
});
ordered.sort((a, b) => a[1] - b[1]);
ordered.forEach((entry) => {
section.appendChild(entry[0]);
})
});
</script>

@ -17,13 +17,16 @@
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}/home">Documentation</a>
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}/about/changelog">Changelog</a>
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}">GitHub</a>
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}{{ site.donateurl }}">Support</a>
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}/extra/donate">Support</a>
</div>
<br/>
<div class="row">
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen1.png" alt="Screenshot 1"></div>
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen2.png" alt="Screenshot 2"></div>
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen3.png" alt="Screenshot 3"></div>
{% assign col = 12 | divided_by: site.screenshots.size %}
{% for screenshot in site.screenshots %}
<div class="col-12 col-sm-{{ col }} mt-4">
<img class="img-fluid" src="{{ site.baseurl }}/static/{{ screenshot }}" alt="Screenshot">
</div>
{% endfor %}
</div>
</div>
</body>

Loading…
Cancel
Save