10ab037833
Moved fileServer and browse.IndexPages into middleware package
2015-09-19 20:35:48 -06:00
8120e57850
add user defined variables into browse template
2015-09-18 08:52:12 +01:00
66fb8f031b
Merge pull request #248 from hacdias/master
...
browse: Option to ignore indexes
2015-09-17 19:01:12 -06:00
9e2bef146e
middleware: Added StripHTML to Context type
2015-09-17 16:23:30 -06:00
30b19190dc
add ignoreIndexes option to browse
2015-09-17 20:33:39 +01:00
8c843ceefd
middleware: Add StripExt to Context type for stripping extensions from paths
2015-09-16 21:31:58 -06:00
faaef83954
Use less strict condition to avoid problems with concurrency
...
In latest go versions TestWatcher fails pretty often, because it is
"more concurrent" now. Reproducible with go master:
while go test github.com/mholt/caddy/middleware/markdown; do :; done
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-11 10:25:13 -07:00
7545755b00
Merge pull request #240 from LK4D4/fix_map_race
...
markdown: fix race in accessing map
2015-09-11 17:00:24 +01:00
a5128da67a
markdown: fix race in accessing map
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-11 08:34:52 -07:00
37eedf5cdc
Fix race in test
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-11 08:34:08 -07:00
da7b9a6bbc
Use markdown.Config as pointer everywhere
...
* As value mutex was copied and therefore synchronization worked wrong
* It's pretty big structure with reference types, so copying create unnecessary
pressure on GC
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-10 15:12:50 -07:00
ed4148f20e
Complete test coverage for replacer for Go
2015-09-10 10:28:13 +05:30
4e1717db4c
basicauth: htpasswd path now relative to site root
2015-09-05 16:04:30 -06:00
159b68aab4
Merge pull request #228 from tgulacsi/htpasswd
...
basicauth: Add htpasswd support
2015-09-05 14:56:23 -06:00
b199825c3b
Fix formatting directives in tests
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-09-04 08:34:58 -07:00
bdcbd11d65
Merge branch 'master' of https://github.com/mholt/caddy
2015-09-02 15:16:06 +02:00
008160998a
Added LogRoller parser and entity.
...
The errors and logs can now have log rolling if provided by the user.
The current customisable parameter of it are:
The maximal size of the file before rolling.
The maximal age/time of the file before rolling.
The number of backups to keep.
2015-09-02 15:13:31 +02:00
392f1d70eb
Add htpasswd support for basic auth
...
If the password arg starts with htpasswd=, then the rest is treated as
the file name of the htpasswd file, and used for md5 and sha1 hashes.
2015-08-30 20:08:42 +02:00
e3cea042d6
Left over comments removed
...
Redundant comments in the code removed
2015-08-30 19:00:35 +05:30
679668e3c0
removed redundant comment lines
2015-08-30 18:57:20 +05:30
730269743f
Json response initial test for browse.go
2015-08-29 08:04:01 +05:30
444f9e40d5
initial test for replacer
2015-08-27 23:36:32 +05:30
b9d3e7721e
Fixing my comment
...
the old comment might throw the source-reader off, my bad.
2015-08-27 18:01:46 +03:00
414b47d653
adds json option for the browse middleware
2015-08-24 23:37:11 +03:00
4704625e3a
Complete test coverage for middleware/recorder.go
2015-08-14 09:59:22 +05:30
53c4797606
Initial setup of test for recorder.go of middleware package
2015-08-11 22:02:13 +05:30
bb072faeee
Initial test for middleware/middleware.go
2015-08-08 00:56:59 +05:30
b62de4c521
New template action NowDate to get the time.Time of Now()
2015-08-05 08:27:13 -06:00
2e8a74ecff
markdown: Prefix log messages, and slight refactor
...
Also change sha1 to md5 for the directory scans; slightly faster.
2015-08-05 08:15:52 -06:00
e94e90b046
Add new docker link, DO link, and enhanced comment
2015-08-05 07:37:51 -06:00
7173764d6d
markdown: Render lists as part of summary (upstream bug workaround)
...
See github.com/russross/blackfriday/issues/189
2015-08-05 07:37:51 -06:00
3b910645e7
Markdown: generate static sites after links.
2015-08-05 09:55:04 +01:00
b5d79bdccc
Markdown: Removed unused constant.
2015-08-05 01:01:57 +01:00
2ab466599d
Markdown: Modify development mode to generate links on page requests.
2015-08-05 00:41:04 +01:00
851026d3fa
Markdown: Watch for file changes. Removed sitegen dependency for links.
2015-08-04 23:35:09 +01:00
8d81ae88da
fastcgi: Add HTTPS env variable on HTTPS connections
2015-08-03 17:16:24 -06:00
36fa6e857b
markdown: Sitegen only occurs if directory exists
...
We do this by returning an error and stopping link generation (which scans the markdown path for files)
2015-08-01 16:09:10 -06:00
35e25be1a4
browse: Size displayed in IEC format
...
Powers of 2, or base 1024, rather than powers of 10 or base 1000. The powers of 2 are technically more accurate.
2015-07-29 19:15:38 -06:00
f7129b219e
Fix markdown tests that I broke
2015-07-29 17:47:33 -06:00
ff28bc8b0a
markdown: Change .Url -> .URL, increase summary length
...
Also, summary truncated at nearest space instead of middle of word, and code spans become part of summary.
2015-07-29 17:43:00 -06:00
0b01489f7d
templates: Date -> Now, add Replace and Truncate
2015-07-29 17:43:00 -06:00
ec51e14451
Merge branch 'master' of https://github.com/mholt/caddy
2015-07-29 23:43:26 +02:00
86e9749d6c
Merge pull request #204 from abiosoft/master
...
markdown: Add .Links action and flattened metadata structure
.Links available only for generated sites and variables no longer in a [variables] category in metadata (flat structure).
2015-07-29 11:12:02 -06:00
aa89f30f2a
renamed sorter to byDate.
2015-07-29 18:06:53 +01:00
da794a866e
Change date of the files in test to serve the static file and not generate a new one
2015-07-29 18:00:08 +02:00
705cd16dee
Fixed path issue: was absolute path but should be relative path
2015-07-29 17:12:32 +02:00
0168a627a4
Added test on markdown static files generation
2015-07-29 16:21:35 +02:00
7b29568eb1
Code cleanups.
...
Fix more race conditions.
2015-07-29 12:21:34 +01:00
a585379bbb
proxy: Parse error if property is unknown
2015-07-28 13:50:40 -06:00
e240cd5ba2
Metadata variables flattened.
...
Fix race condition on parsers.
Added page links generator.
2015-07-28 05:21:09 +01:00