Skip to content

Commit 8be6e06

Browse files
committed
Test
1 parent e81bcca commit 8be6e06

35 files changed

+2299
-1
lines changed

404.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: default
3+
permalink: /404.html
4+
---
5+
6+
<!-- redirect to page creator if not exists -->
7+
<script type="text/javascript">
8+
var filename = window.location.pathname.split('/').pop();
9+
if (!filename.endsWith(".md"))
10+
filename+=".md";
11+
12+
var url = '{{ site.github.repository_url }}/new/{{site.git_branch}}?filename={{ site.wiki_folder | default: 'wiki' }}/'+filename;
13+
window.location=url;
14+
</script>

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Drassil.org
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

100644100755
+67-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
# hackinit.github.io
1+
# Welcome to git-wiki demo
2+
3+
This is a [demo](wiki/Demo.md) of git-wiki theme for jekyll.
4+
5+
it's a full featured wiki powered by git, github pages and pull-requests!
6+
7+
It means:
8+
9+
* Improvements in the cooperative aspect: forks, pull-requests and roles.
10+
* You can customize your wiki as you want with style sheets and even changing the layout.
11+
* No databases! Only static files that can be downloaded in a few seconds.
12+
* Markdown and html mixed together!
13+
* History, revision comparison and everything you need from a wiki platform.
14+
* You can edit your pages with the standard git editor, prose.io (integrated) or any kind of editor you prefer.
15+
16+
You can fork/copy the master branch now and start your wiki in just 1 minute.
17+
18+
Then [share your wiki with us!](wiki/Showreel.md) please.
19+
20+
**Note:**
21+
You can even include the github wiki as a submodule and enable the conf, but it's an experimental feature and it implies less advantages and greater disadvantages for now.
22+
23+
## Installation instructions
24+
25+
1. Fork or copy [this repository](https://github.com/drassil/git-wiki)
26+
27+
2. copy and rename _config.yml.dist in _config.yml changing settings inside
28+
29+
3. create your index.md in root directory
30+
31+
4. push your changes in your repository, then configure the github pages in your repository settings
32+
33+
5. Your wiki is ready!
34+
35+
**Note:**
36+
37+
We suggest the creation of a /wiki/ subfolder that collects all your .md pages (except index.md)
38+
39+
## Current known limitations
40+
41+
* Non-existent wiki page links are not "[red](wiki/red.md)".
42+
43+
* You can't use the wiki link format: [[example]]. Please, use gh-pages links instead: \[example\](example)
44+
45+
## Customization
46+
47+
You can create following files in _includes folder to costumize git-wiki without patching original code:
48+
49+
* head.html -> this file will be included in <head> tag allowing you to add css/js and any kind of head tags
50+
* sidebar.html -> this file will be included in left sidebar allowing you to create your widgets
51+
* comments.html -> this is mostly used to integrate social comments under page contents
52+
* footer.html -> this file will be included in left side of the footer.
53+
54+
## Looking for collaboration
55+
56+
Do you like this project? then, contact us via [chat](https://gitter.im/Drassil/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link) , <a href="mailto:[email protected]">email</a> or send us a PR to improve it.
57+
58+
Thank you!
59+
60+
## Components used
61+
62+
- [jekyll-table-of-contents](https://github.com/ghiculescu/jekyll-table-of-contents)
63+
64+
- [jQuery](https://jquery.com/)
65+
66+
67+
[MIT LICENSE](LICENSE)

_config.yml.dist

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
title: Open hack.init()
2+
description: 从组织推动中国黑客文化发展
3+
show_downloads: false
4+
git_branch: master
5+
logo_url:
6+
google_analytics:
7+
theme:
8+
wiki_folder: wiki
9+
use_github_wiki: false
10+
use_prose_io: true
11+
google_cse_token:
12+
custom_head: true
13+
custom_sidebar: true
14+
custom_footer: true
15+
gems:
16+
- jekyll-sitemap
17+
- jekyll-mentions
18+
- jemoji
19+
- jekyll-redirect-from
20+
- jekyll-feed

_includes/.gitkeep

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

_layouts/default.html

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
{% capture lchar %}{{page.url | slice: -1, 1}}{% endcapture %}
5+
{% capture url %}{% if lchar == "/" %}{{page.url}}index.html{% else %}{{ page.url | default: 'index.html' }}{% endif %}{% endcapture %}
6+
<meta charset="utf-8">
7+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
8+
<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>
9+
10+
<script
11+
src="https://code.jquery.com/jquery-3.2.1.min.js"
12+
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
13+
crossorigin="anonymous"></script>
14+
15+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
16+
<script src="{{ '/assets/js/wiki-features.js' | relative_url }}"></script>
17+
18+
{% if site.custom_head %}
19+
{% include head.html %}
20+
{% endif %}
21+
22+
<meta name="viewport" content="width=device-width">
23+
<!--[if lt IE 9]>
24+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
25+
<![endif]-->
26+
</head>
27+
<body>
28+
<div class="wrapper">
29+
<header>
30+
<a href="{{ '/' | relative_url }}"><img src="{{ site.logo_url }}">
31+
<h1>{{ site.title | default: site.github.repository_name }}</h1>
32+
</a>
33+
<p>{{ site.description | default: site.github.project_tagline }}</p>
34+
35+
{% if site.github.is_user_page %}
36+
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
37+
{% endif %}
38+
39+
{% if site.show_downloads %}
40+
<ul class="downloads">
41+
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
42+
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
43+
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
44+
</ul>
45+
{% endif %}
46+
47+
{% if site.custom_sidebar %}
48+
{% include sidebar.html %}
49+
{% endif %}
50+
51+
</header>
52+
<section>
53+
<div id="tools-buttons" style="width: 100%; text-align: right">
54+
{{page.relative_path}}
55+
{% if site.use_github_wiki %}
56+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{{page.folder}}{{url | remove: '.html' | append: ''}}/_edit">Edit</a></span>
57+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{{page.folder}}{{url | remove: '.html' | append: ''}}/_history">History</a></span>
58+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{{page.folder}}{{url | remove: '.html' | append: '.md'}}/">Source</a></span>
59+
{% else %}
60+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/edit/{{site.git_branch}}{{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit</a></span>
61+
{% if site.use_prose_io %}
62+
<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/edit/{{site.git_branch}}{{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit with Prose.io</a></span>
63+
{% endif %}
64+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/commits/{{site.git_branch}}{{{page.folder}}{{url | remove: '.html' | append: '.md'}}">History</a></span>
65+
<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch}}{{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Source</a></span>
66+
{% endif %}
67+
68+
{% if site.google_cse_token %}
69+
<script>
70+
(function() {
71+
var cx = "{{site.google_cse_token}}";
72+
var gcse = document.createElement('script');
73+
gcse.type = 'text/javascript';
74+
gcse.async = true;
75+
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
76+
var s = document.getElementsByTagName('script')[0];
77+
s.parentNode.insertBefore(gcse, s);
78+
})();
79+
</script>
80+
<gcse:search></gcse:search>
81+
{% else %}
82+
<form method="GET" action="{{ site.github.repository_url }}/search">
83+
{% if site.use_github_wiki %}
84+
<input type="hidden" name="type" value="Wikis">
85+
{% endif %}
86+
<input type="text" name="q" placeholder="Text to search"><input type="submit" value="Search">
87+
</form>
88+
{% endif %}
89+
</div>
90+
91+
<div id="toc"></div>
92+
93+
<div id="content">
94+
{{ content }}
95+
</div>
96+
97+
{% if site.comments %}
98+
{% include comments.html %}
99+
{% endif %}
100+
101+
</section>
102+
<footer>
103+
{% if site.custom_footer %}
104+
{% include footer.html %}
105+
{% endif %}
106+
107+
{% if site.github.is_project_page %}
108+
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
109+
{% endif %}
110+
<p><small>Hosted on GitHub Pages &mdash; Powered by <a href="https://github.com/Drassil/git-wiki">Git-Wiki</a> </p>
111+
{% if site.github.is_project_page %}
112+
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p>
113+
{% endif %}
114+
</footer>
115+
</div>
116+
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>
117+
118+
119+
{% if site.google_analytics %}
120+
<script>
121+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
122+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
123+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
124+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
125+
126+
ga('create', '{{ site.google_analytics }}', 'auto');
127+
ga('send', 'pageview');
128+
</script>
129+
{% endif %}
130+
131+
<script type="text/javascript">
132+
$(document).ready(function() {
133+
$('#toc').toc({ title: '<i>Contents</i>'});
134+
});
135+
</script>
136+
</body>
137+
</html>

_layouts/page.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: default
3+
---
4+
5+
{{ content }}

_sass/fonts.scss

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@font-face {
2+
font-family: 'Noto Sans';
3+
font-weight: 400;
4+
font-style: normal;
5+
src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot');
6+
src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot?#iefix') format('embedded-opentype'),
7+
local('Noto Sans'),
8+
local('Noto-Sans-regular'),
9+
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff2') format('woff2'),
10+
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff') format('woff'),
11+
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.ttf') format('truetype'),
12+
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.svg#NotoSans') format('svg');
13+
}
14+
15+
@font-face {
16+
font-family: 'Noto Sans';
17+
font-weight: 700;
18+
font-style: normal;
19+
src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot');
20+
src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot?#iefix') format('embedded-opentype'),
21+
local('Noto Sans Bold'),
22+
local('Noto-Sans-700'),
23+
url('../fonts/Noto-Sans-700/Noto-Sans-700.woff2') format('woff2'),
24+
url('../fonts/Noto-Sans-700/Noto-Sans-700.woff') format('woff'),
25+
url('../fonts/Noto-Sans-700/Noto-Sans-700.ttf') format('truetype'),
26+
url('../fonts/Noto-Sans-700/Noto-Sans-700.svg#NotoSans') format('svg');
27+
}
28+
29+
@font-face {
30+
font-family: 'Noto Sans';
31+
font-weight: 400;
32+
font-style: italic;
33+
src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot');
34+
src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot?#iefix') format('embedded-opentype'),
35+
local('Noto Sans Italic'),
36+
local('Noto-Sans-italic'),
37+
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff2') format('woff2'),
38+
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff') format('woff'),
39+
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.ttf') format('truetype'),
40+
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.svg#NotoSans') format('svg');
41+
}
42+
43+
@font-face {
44+
font-family: 'Noto Sans';
45+
font-weight: 700;
46+
font-style: italic;
47+
src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot');
48+
src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot?#iefix') format('embedded-opentype'),
49+
local('Noto Sans Bold Italic'),
50+
local('Noto-Sans-700italic'),
51+
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2') format('woff2'),
52+
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff') format('woff'),
53+
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'),
54+
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg');
55+
}

0 commit comments

Comments
 (0)