blob: 5f8e95150c6efb0705adda87b5e0ae23f2a30fb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
Bitmask downloads
-----------------------------------------
This is the Bitmask download website (https://dl.bitmask.net)
It is entirely static, but relies on a bunch of apache tricks for things like language negotiation and pretty directory indexes.
The static content files in ./public/ are rendered from the content in ./pages/ using the command `amber rebuild`.
To install amber:
gem install amber
See https://github.com/elijh/amber for more information.
Requirements
-----------------------------------------
The following apache mods are required:
sudo a2enmod include rewrite autoindex mime negotiation
The following apache directives are required, on the document root:
##
## PERMISSIONS
##
AllowOverride None
Order deny,allow
Allow from all
##
## LOCALE SUPPORT (e.g. index.en.html)
##
LanguagePriority en
ForceLanguagePriority Prefer Fallback
DirectoryIndex index
Options +MultiViews
##
## REWRITES
##
Options +FollowSymLinks
RewriteEngine on
#LogLevel alert rewrite:trace4
#
# Allow /:locale/ prefix path if the document exists
# e.g. /de/blah/ ==> /blah/index.de.html
#
RewriteCond %{DOCUMENT_ROOT}/$2/index.$1.html -f
RewriteRule ^([a-z]{2})/(.*) /$2/index.$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/index.$1.html -f
RewriteRule ^([a-z]{2})$ /index.$1.html [L]
#
# Fall back to english if the document doesn't exist
# e.g. /xx/blah ==> /blah/index.en.html
#
RewriteCond %{DOCUMENT_ROOT}/$2/index.$1.html !-f
RewriteRule ^([a-z]{2})/(.*) /$2/index.en.html [L]
RewriteCond %{DOCUMENT_ROOT}/index.$1.html !-f
RewriteRule ^([a-z]{2})$ /index.en.html [L]
##
## Index Directories
##
Options +Indexes
IndexOptions +FancyIndexing +Charset=UTF-8
IndexOptions +SuppressRules +SuppressDescription +NameWidth=*
IndexOptions +FoldersFirst +VersionSort
IndexOptions +SuppressHTMLPreamble +HTMLTable
HeaderName /assets/header.html
ReadmeName /assets/footer.html
AddIcon /assets/icons/blank.png ^^BLANKICON^^
AddIcon /assets/icons/folder.png ^^DIRECTORY^^
AddIcon /assets/icons/folder-home.png ..
AddIcon /assets/icons/audio.png .aif .iff .m3u .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg
AddIcon /assets/icons/bin.png .bin
AddIcon /assets/icons/c.png .c
AddIcon /assets/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv
AddIcon /assets/icons/css.png .css
AddIcon /assets/icons/deb.png .deb
AddIcon /assets/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps
AddIcon /assets/icons/draw.png .svg
AddIcon /assets/icons/eps.png .ai .eps
AddIcon /assets/icons/gif.png .gif
AddIcon /assets/icons/html.png .html .xhtml .shtml .htm
AddIcon /assets/icons/ico.png .ico
AddIcon /assets/icons/java.png .jar
AddIcon /assets/icons/jpg.png .jpg .jpeg
AddIcon /assets/icons/js.png .js .json
AddIcon /assets/icons/markdown.png .md
AddIcon /assets/icons/package.png .pkg .dmg
AddIcon /assets/icons/pdf.png .pdf
AddIcon /assets/icons/php.png .php .phtml
AddIcon /assets/icons/png.png .png
AddIcon /assets/icons/ps.png .ps
AddIcon /assets/icons/psd.png .psd
AddIcon /assets/icons/rar.png .rar
AddIcon /assets/icons/rb.png .rb
AddIcon /assets/icons/rpm.png .rpm
AddIcon /assets/icons/rss.png .rss
AddIcon /assets/icons/sql.png .sql
AddIcon /assets/icons/tiff.png .tiff
AddIcon /assets/icons/text.png .txt .nfo
AddIcon /assets/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv
AddIcon /assets/icons/xml.png .xml
AddIcon /assets/icons/zip.png .zip
DefaultIcon /assets/icons/default.png
Credits
-----------------------------------------
Dir listing style from Apaxy - https://github.com/AdamWhitcroft/Apaxy
License: in the public domain.
Icons are from "Faenza Icons" -- http://tiheum.deviantart.com/art/Faenza-Icons-173323228
License: GNU General Public License.
Stylesheet is from Bootstrap -- http://getbootstrap.com
License: Apache, version 2 -- https://www.apache.org/licenses/LICENSE-2.0.html
The fonts are Font Awesome -- http://fortawesome.github.io
License: SIL OFL 1.1 -- http://scripts.sil.org/OFL
|