Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cl-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vincent Dardel
cl-site
Commits
f5b89fe1
Commit
f5b89fe1
authored
Nov 09, 2018
by
Erik Huelsmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pre- and post-processing are part of rendering (no extra output)
parent
7eac1061
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
process.lisp
process.lisp
+5
-10
No files found.
process.lisp
View file @
f5b89fe1
...
...
@@ -51,21 +51,16 @@
(
let*
((
md-file
(
enough-namestring
(
make-path
*pages-dir*
context
t
)
*pages-dir*
)))
(
unless
(
string=
(
pathname-type
md-file
)
"md"
)
(
return-from
preprocess-md-page
(
call-next-hook
content
context
)))
(
let
((
html-file
(
make-pathname
:defaults
md-file
:type
"html"
)))
(
format
t
"Transforming ~A to ~A~%"
md-file
html-file
)
(
let
((
md-content
(
with-output-to-string
(
out
)
(
cl-markdown:markdown
content
:stream
out
))))
(
call-next-hook
md-content
context
)
))))
(
call-next-hook
md-content
context
))))
(
def-render-hook
preprocess-lisp-page
(
content
context
)
(
let*
((
lisp-file
(
make-path
*pages-dir*
context
t
)))
(
unless
(
string=
(
pathname-type
lisp-file
)
"lisp"
)
(
return-from
preprocess-lisp-page
(
call-next-hook
content
context
)))
(
let
((
html-file
(
enough-namestring
(
make-pathname
:defaults
lisp-file
:type
"html"
)
*pages-dir*
))
*computed-page-content*
)
(
format
t
"Loading ~a and creating fresh ~a...~%"
(
file-namestring
lisp-file
)
html-file
)
(
let
(
*computed-page-content*
)
;;;###TODO not happy about loading the lisp file; it defeats the preprocessor/postprocessor purpose
(
load
(
merge-pathnames
lisp-file
*pages-dir*
))
(
let
((
headers
(
getf
*computed-page-content*
:headers
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment