Skip to content

Commit

Permalink
Merge pull request #29 from lawndoc/add-root-listing
Browse files Browse the repository at this point in the history
Add root listing
  • Loading branch information
lawndoc authored Aug 28, 2023
2 parents ccaa797 + 87ca859 commit c74957e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jekyll-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Compile Jekyll
run: |
cd docs
bundle exec jekyll build --future --verbose
bundle exec jekyll build --config _test.yml --verbose
build-windows:

Expand All @@ -40,4 +40,4 @@ jobs:
- name: Compile Jekyll
run: |
cd docs
bundle exec jekyll build --future --verbose
bundle exec jekyll build --config _test.yml --verbose
3 changes: 3 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ defaults:
values:
layout: page

exclude:
- _test.yml

author:
name: C.J. May
email: [email protected]
Expand Down
14 changes: 12 additions & 2 deletions docs/_includes/directory.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,18 @@ <h1>
const fileName = file.name;
const isMarkdown = (/.md$/).test(fileName);
const isInFilter = filter.split(' ')
.every((token) => fileName.indexOf(token.toLowerCase()) !== -1)
return !isMarkdown && isInFilter;
.every((token) => fileName.toLowerCase().indexOf(token.toLowerCase()) !== -1);
const isInExclusions = [
"CNAME",
"Gemfile",
"Windows-Folder-Search.png",
"_config.yml",
"_includes",
"_layouts",
"favicon.ico",
"serviceworker.js",
].includes(fileName);
return !isMarkdown && isInFilter && !isInExclusions;
}
}
// Match by closest to start of word then earliest word
Expand Down
36 changes: 36 additions & 0 deletions docs/_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
remote_theme: jekyll/minima

defaults:
-
scope:
path: "" # all files in project
values:
layout: page

exclude:
- _config.yml
- Program Files/
- Program Files (x86)/
- ProgramData/
- Users/
- Windows/

include:
- Windows/System32/calc.exe/index.md
- Windows/System32/index.md
- Windows/index.md

author:
name: C.J. May
email: [email protected]

minima:
skin: solarized
social_links:
- {platform: github, user_url: "https://github.com/lawndoc"}
- {platform: twitter, user_url: "https://twitter.com/lawndoc"}
- {platform: linkedin, user_url: "https://linkedin.com/in/cj-may"}

plugins:
- jekyll-seo-tag
- jekyll-remote-theme
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ The scope of this documentation is only files that come with a base install of a
## For power users

For programmatic access to this data, it's best to clone the [GitHub repo](https://github.com/lawndoc/winbin.wtf) and extract the data from the YAML frontmatter of each document. If this project gets popular enough, maybe we will add a REST and/or GraphQL API for easier access.

# Documentation Root

{% include directory.html %}

0 comments on commit c74957e

Please sign in to comment.