Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Commit 0dc65be

Browse files
committed
added files
1 parent 8a3d973 commit 0dc65be

File tree

6 files changed

+115
-2
lines changed

6 files changed

+115
-2
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MIT License
2-
Copyright (c) <year> <copyright holders>
2+
Copyright (c) 2016 haliphax
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
55

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
# repo2site
22

3-
Uses AJAX to built an HTML site from a git repo's MarkDown files
3+
Uses AJAX to build an HTML site from a git repo's MarkDown files
4+
5+
## Usage
6+
7+
Usage is seen in the `index.html` file. Replace the `<body>` tag's `onload`
8+
attribute so that it calls `repo2site` using your username and repo name.
9+
You may also specify the branch name (default: `master`) and the name of the
10+
initial file to load (default: `README.md`).
11+
12+
This currently only works with GitHub, but could easily be adapted to other
13+
services by replacing the `stem` variable in `repo2site.js`.
14+
15+
## Example
16+
17+
The [x84-extras](https://x84-extras.github.io) site uses repo2site to generate
18+
its pages.
19+
20+
## Credits
21+
22+
I'm using [markdown-js](https://github.com/evilstreak/markdown-js) and a
23+
simple, cross-browser, vanilla JS AJAX implementation I found on
24+
[Krasimir Tsonev's blog](http://krasimirtsonev.com/blog/article/Cross-browser-handling-of-Ajax-requests-in-absurdjs)
25+
(which is used in AbsurdJS).

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Demonstration</title>
6+
</head>
7+
<body onload="repo2site('username/reponame');">
8+
<p>Loading...</p>
9+
<script src="js/ajax.min.js"></script>
10+
<script src="js/markdown.min.js"></script>
11+
<script src="js/repo2site.js"></script>
12+
</body>
13+
</html>

js/ajax.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)