Merge pull request #53 from hasheddan/readme-link

Set repopath to docs/README.md if empty
This commit is contained in:
Daniel Mangum 2020-07-20 18:01:55 -05:00 committed by GitHub
commit b76d882014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@
{% assign latestVersion = site.data.versions[0].version %}
{% assign filepath = page.url | replace: currentVersionPath %}
{% assign repopath = 'docs/' | append: filepath | remove: '.html' | append: '.md' %}
{% if repopath == 'docs/.md' %}{% assign repopath = 'docs/README.md' %}{% endif %}
{% include mkhash.inc title = 'Welcome' url = currentVersionPath %}
{% assign documents = site.pages | where_exp: 'page', 'page.url contains currentVersionPath' | where: "toc", "true" | sort: 'weight' | unshift: h %}