Skip to content
This repository was archived by the owner on Mar 19, 2023. It is now read-only.

Commit d84b461

Browse files
committed
update readme and create release
- add preview images - add demo - add ci/cd Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
1 parent 4799496 commit d84b461

File tree

1 file changed

+56
-12
lines changed

1 file changed

+56
-12
lines changed

README.md

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,94 @@
1+
12
# apindex - static file index generator/load reducer
2-
__Generate a file index for Github Pages__
33

4-
![img](https://i.imgur.com/jyZPglj.png)
4+
__Generate a file index for GitHub/GitLab Pages__
5+
6+
![enter image description here](https://i.imgur.com/m8aXfGu.png)
7+
58

69
### Quick install
10+
711
```sh
12+
813
curl https://raw.githubusercontent.com/jayanta525/apindex/master/install.sh | bash
14+
915
```
1016

17+
18+
1119
### What is this?
20+
1221
This is a program that generates `index.html` files in each directory on your server that render the file tree. This is useful for static web servers that need support for file listing. One example of this is Github Pages.
1322

23+
24+
1425
It can also be used to reduce the server load for servers that serve static content, as the server does not need to generate the index each time it is accessed. Basically permanent cache.
1526

27+
28+
1629
The file icons are also embedded into the `index.html` file so there is no need for aditional HTTP requests.
1730

31+
### CI/CD Pipeline
32+
33+
The install script can be used with CI/CD with the required dependencies.
34+
35+
36+
Check it out here: [gitlab-ci.yml](https://gitlab.com/jayanta525/openwrt-sunxi/-/blob/master/.gitlab-ci.yml)
37+
38+
image: ubuntu:bionic
39+
pages:
40+
script:
41+
- rm -rf .git*
42+
- apt-get update
43+
- apt-get install curl git -y
44+
- curl https://raw.githubusercontent.com/jayanta525/apindex/master/install.sh | bash
45+
- apindex .
46+
- mkdir .public
47+
- cp -r * .public
48+
- mv .public public
49+
artifacts:
50+
paths:
51+
- public
52+
only:
53+
- master
54+
1855
### Demo
19-
The FTP archive of thinkpads.org is hosted on Github Pages and its generated with apindex.
20-
Check it out: https://thinkpads.org/ftp/
56+
57+
This openwrt kmod download archive is hosted on GitLab Pages and its generated with apindex.
58+
59+
Check it out: [https://jayanta525.gitlab.io/openwrt-sunxi/](https://jayanta525.gitlab.io/openwrt-sunxi/)
60+
61+
2162

2263
### How do I use it?
64+
2365
Just run:
66+
2467
```
2568
apindex <path-to-directory>
2669
```
70+
2771
The index header server path is based on your current working directory. So if you run the script from `/home/parent` on the directory `/home/parent/child` like this:
72+
2873
```
2974
cd /home/parent
75+
3076
apindex child/.
3177
```
78+
3279
The index is generated as __Index of /child__.
80+
3381
If you want it to be absolute to the child directory, then you run apindex from there.
82+
3483
```
3584
cd /home/parent/child
85+
3686
apindex .
3787
```
88+
3889
This renders __Index of /__.
3990

40-
### How do I install it?
41-
42-
```
43-
tar -xf apindex-x.xx.tar.gz
44-
cp apindex-x.xx
45-
cmake . -DCMAKE_INSTALL_PREFIX=/usr
46-
sudo make install
47-
```
4891

4992
### How do I add/remove icons?
93+
5094
See `share/icons.xml` and the files under `share/img/*`.

0 commit comments

Comments
 (0)