This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
enh: Add docs #85
Open
scorbett123
wants to merge
11
commits into
kami-blue:master
Choose a base branch
from
scorbett123:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
enh: Add docs #85
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fde2862
add docs
scorbett123 30ce293
add docs
scorbett123 7f4df9a
Just some changes of names and urls, nothing serious.
5f200b4
Update README.md
Natan515 b2ff558
Update README.md
Natan515 a8161b3
Update README.md
Natan515 98e8dc7
A lot of changes, but no real coding, just name changing
3ffd35d
Merge pull request #1 from Natan515/master
Natan515 19d39e7
Merge remote-tracking branch 'upstream/master'
scorbett123 7df7b6f
fixes
scorbett123 8085941
new changes
scorbett123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "_docs"] | ||
path = _docs | ||
url = https://github.com/scorbett123/docs.git | ||
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
gem "webrick", "~> 1.7" |
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,10 @@ | ||
<div class=scrollArea> | ||
<div class="scrollBar"> | ||
<div class="internalScrollArea"> | ||
<a href=".././"> | ||
<div class="project-name">KAMI Blue</div> | ||
</a> | ||
{% include subnav.html nav=site.data.nav %} | ||
</div> | ||
</div> | ||
</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,18 @@ | ||
{% for item in include.nav %} | ||
{% if item.title %} | ||
{% if item.url %} | ||
<a href="{{ item.url }}"> | ||
<div {% if item.url== page.url %} class="currentDoc" {% endif %}> {{ item.title }}</div> | ||
</a> | ||
|
||
|
||
{% endif %} | ||
|
||
{% if item.subnav %} | ||
<div style="padding-top: 1rem"> {{ item.title }}</div> | ||
<div style="padding:1rem"> | ||
{% include subnav.html nav=item.subnav %} | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} |
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,64 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ site.lang | default: " en-US" }}"> | ||
<head> | ||
|
||
{% if site.google_analytics %} | ||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
|
||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
|
||
gtag('js', new Date()); | ||
gtag('config', '{{ site.google_analytics }}'); | ||
</script> | ||
{% endif %} | ||
<script data-ad-client="ca-pub-7708188084469659" async | ||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | ||
<meta charset="UTF-8"> | ||
|
||
{% seo %} | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="theme-color" content="#9b90ff"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | ||
<link rel="shortcut icon" type="image/png" href="/favicon.png"/> | ||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> | ||
|
||
<!-- Google / Search Engine Tags --> | ||
<meta itemprop="name" content="KAMI Blue"> | ||
<meta itemprop="description" content="A Minecraft utility mod for anarchy servers"> | ||
<meta itemprop="image" | ||
content="https://raw.githubusercontent.com/kami-blue/assets/assets/assets/icons/kamiSmall.png"> | ||
|
||
<!-- Facebook Meta Tags --> | ||
<meta property="og:url" content="https://kamiblue.org"> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:title" content="KAMI Blue"> | ||
<meta property="og:description" content="A Minecraft utility mod for anarchy servers"> | ||
<meta property="og:image" | ||
content="https://raw.githubusercontent.com/kami-blue/assets/assets/assets/icons/kamiSmall.png"> | ||
|
||
<!-- Twitter Meta Tags --> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
<meta name="twitter:title" content="KAMI Blue"> | ||
<meta name="twitter:description" content="A Minecraft utility mod for anarchy servers"> | ||
<meta name="twitter:image" | ||
content="https://raw.githubusercontent.com/kami-blue/assets/assets/assets/icons/kamiSmall.png"> | ||
|
||
<!-- Embed icon --> | ||
<meta content="/favicon.png" property="og:image"> | ||
</head> | ||
<body> | ||
|
||
<main id="content" class="grid" role="main"> | ||
<div> | ||
{% include options.html %} | ||
</div> | ||
<div class="docContent">{{ content }}</div> | ||
|
||
|
||
</main> | ||
</body> | ||
</html> |
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,47 @@ | ||
module Options | ||
Jekyll::Hooks.register :site, :pre_render do |site| | ||
|
||
site.data["nav"] = [] | ||
x = site.pages | ||
x = x.sort_by { |x| x.url.split("/").length() } # make sure entries are in a nice order | ||
x.each { |page| | ||
if page.url.index("/_docs") == 0 # only run when it is a doc | ||
|
||
title = page.url.dup | ||
title[".html"] = "" # remove .html from the end of file names. | ||
title["/_docs/"] = "" | ||
site.data["nav"] << do_for_sub(site.data["nav"], title.dup, page.url) | ||
|
||
end | ||
} | ||
|
||
end | ||
|
||
def Options.do_for_sub(current, title, full_url) | ||
if title.split("/").length() > 1 | ||
x = get_pos_in_array(current, title.partition("/").first) | ||
if x != nil | ||
current[x]["subnav"] << do_for_sub(current[x]["subnav"], title.partition("/").last, full_url) | ||
else | ||
current << { "title" => title.partition("/").first, "subnav" => do_for_sub([], title.partition("/").last, full_url) } | ||
end | ||
else | ||
current << { "title" => title.partition("/").first, "url" => full_url } | ||
|
||
end | ||
return current | ||
end | ||
|
||
def Options.get_pos_in_array(array, title) | ||
array.each_with_index do |item, i| | ||
if item.is_a? Array | ||
next | ||
end | ||
if item["title"] == title | ||
return i | ||
end | ||
end | ||
|
||
nil | ||
end | ||
end |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be changed to a custom docs repo, however I thought that a submodule would mean that the docs could be separated out meaning that they are easier to contribute to.