0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
Commit graph

38 commits

Author SHA1 Message Date
Tobias Weingartner
61c7a51bfa Errant commented import. 2016-05-01 16:50:25 -07:00
Tobias Weingartner
2bccc1466e Fixup and address most of the feedback. 2016-04-30 20:09:25 -07:00
Tobias Weingartner
04089c533b Return errors. 2016-04-30 17:04:44 -07:00
Tobias Weingartner
e0bc426050 Initial re-add of markdown summary functionality. 2016-04-30 17:01:31 -07:00
Tobias Weingartner
b541c717ca Add ability to markdown a directory with a template. 2016-04-16 16:50:45 -07:00
Tobias Weingartner
7c9867917a Fixup tests and move metadata into own package 2016-04-16 14:45:32 -07:00
Tobias Weingartner
42b7d57421 Fix more tests, and fix template parsing. 2016-04-10 23:17:01 -07:00
Tobias Weingartner
027f697fdf Revamp markdown processing.
Nuke pre-generation.  This may come back in the form of a more general
caching layer at some later stage.

Nuke index generation.  This should likely be rethought and re-implemented.
2016-04-10 17:47:55 -07:00
Matthew Holt
90c24d2f32 Included files in Markdown templates have access to document vars (fixes #660)
Refactor how middleware.Context includes files
2016-03-16 13:42:16 -06:00
Maxim Kupriianov
c7674e2060 Implement .DocFlags directive and tests. It holds all the boolean-typed front matter values. 2016-02-22 13:53:47 +03:00
Miek Gieben
fbdfc979ec Markdown: enable definition lists 2016-02-04 11:21:44 +00:00
Matthew Holt
bcea5182c6 Don't truncate process log; more consistent output 2015-11-05 17:01:08 -07:00
buddhamagnet
57f1d3c205 pass golint
pass all tests

respond to maintainer comments

reinstate assignment of t

correct typo

correct typo

pass linter some more
2015-11-05 00:40:35 +00:00
Matthew Holt
234783548f markdown: Enable tables, fenced code, and strikethrough (closes #294) 2015-10-29 09:59:32 -06:00
Zac Bergquist
e158cda057 Fix test failures on Windows.
Most of the Windows test failures are due to the path separator not being "/".  The general approach I took here was to keep paths in "URL form" (ie using "/" separators) as much as possible, and only convert to native paths when we attempt to open a file.  This will allow the most consistency between different host OS.  For example, data structures that store paths still store them with "/" delimiters.  Functions that accepted paths as input and return them as outputs still use "/".

There are still a few test failures that need to be sorted out.

- config/setup/TestRoot (I hear this has already been fixed by someone else)
- middleware/basicauth/TestBrowseTemplate and middleware/templates/Test (a line endings issue that I'm still working through)
2015-10-13 19:49:53 -04:00
Zac Bergquist
f9bc74626d Address various lint and gocyclo warnings. Fixes #253 2015-10-11 16:28:02 -04:00
Alexander Morozov
a5128da67a markdown: fix race in accessing map
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-09-11 08:34:52 -07:00
Alexander Morozov
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
Matthew Holt
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
Abiola Ibrahim
7b29568eb1 Code cleanups.
Fix more race conditions.
2015-07-29 12:21:34 +01:00
Abiola Ibrahim
e240cd5ba2 Metadata variables flattened.
Fix race condition on parsers.
Added page links generator.
2015-07-28 05:21:09 +01:00
Maxime
d1eb2ea9e2 Changed metadata variables type:
from map[string]interface{} to map[string]string
2015-07-26 18:32:34 +02:00
Maxime
604c8abb59 Remove debug line, add file name as default title 2015-07-25 22:39:13 +02:00
Maxime
ef4a4b0ab8 Removed attribute not needed. 2015-07-24 22:17:14 +02:00
Maxime
24bdb433c9 Changed .Var to .Doc in Markdown templates
Put the title into the .Doc variables as well.
Changed the test template file to use new names.
2015-07-24 22:14:05 +02:00
Maxime
97dcc79a7f Remove undesired committed debug logs 2015-07-23 11:53:15 +02:00
Maxime
bc2feece4b Moved test files to testdata folder.
Changed the tests accordingly.
2015-07-23 09:35:46 +02:00
Maxime
2df30d186e Added a test on markdown for the default template 2015-07-21 17:45:32 +02:00
Maxime
6451e10d3e Add context to markdown template
Created a struct containing middleware.Context, Title, Markdown and the
variables from the user to use to render the template.
The title now can be accessed via {{.Title}}.
The variables can now be accessed via {{.Var.myVariableName}}.
2015-07-21 07:58:34 +02:00
Matthew Holt
4272536518 markdown: sitegen keyword and run generation at startup
Also fixed bug for markdown files that don't contain front matter
2015-05-09 21:12:52 -06:00
Matthew Holt
8ea98f8cce markdown: Fix panic: assignment to entry in nil map
Ensures metadata.Variables is made
2015-05-09 11:49:28 -06:00
Abiola Ibrahim
2f5e2f39cb markdown: remove identifier from Json metadata 2015-05-09 11:49:54 +01:00
Abiola Ibrahim
6ce83aad2b markdown: Refactor fixes 2015-05-09 00:54:39 +01:00
Abiola Ibrahim
48a12c605a markdown: Added template support. 2015-05-08 23:45:31 +01:00
Abiola Ibrahim
0fccd3707d markdown: documentation done. awaiting test 2015-05-08 16:20:07 +01:00
Abiola Ibrahim
ba613a1567 markdown: template integration done. awaiting documentation and test 2015-05-07 13:45:27 +01:00
Abiola Ibrahim
0bfdb50ade markdown: working version of template integration. Awaiting static site generation and tests. 2015-05-07 00:19:02 +01:00
Abiola Ibrahim
25847a6192 markdown: added template codes. awaiting integration and tests 2015-05-06 03:37:29 +01:00