Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
David Declerck
www
Commits
030b8eab
Unverified
Commit
030b8eab
authored
Aug 11, 2021
by
zapashcanon
Browse files
change structure
parent
f0032648
Changes
74
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
6 additions
and
15 deletions
+6
-15
src/content/course_mastering_opam_ocaml_tools.md
src/content/course_mastering_opam_ocaml_tools.md
+0
-0
src/content/course_ocaml_code_opti.md
src/content/course_ocaml_code_opti.md
+0
-0
src/content/course_ocaml_development.md
src/content/course_ocaml_development.md
+0
-0
src/content/course_ocaml_expert.md
src/content/course_ocaml_expert.md
+0
-0
src/content/course_rust_vocational_training.md
src/content/course_rust_vocational_training.md
+0
-0
src/content/expertise.md
src/content/expertise.md
+0
-0
src/content/index.md
src/content/index.md
+0
-0
src/content/jobs.md
src/content/jobs.md
+0
-0
src/content/legal-notice.md
src/content/legal-notice.md
+0
-0
src/content/research-and-development.md
src/content/research-and-development.md
+0
-0
src/content/team.md
src/content/team.md
+0
-0
src/content/trainings.md
src/content/trainings.md
+0
-0
src/dune
src/dune
+4
-13
src/server.ml
src/server.ml
+2
-2
No files found.
src/
pages
/course_mastering_opam_ocaml_tools.md
→
src/
content
/course_mastering_opam_ocaml_tools.md
View file @
030b8eab
File moved
src/
pages
/course_ocaml_code_opti.md
→
src/
content
/course_ocaml_code_opti.md
View file @
030b8eab
File moved
src/
pages
/course_ocaml_development.md
→
src/
content
/course_ocaml_development.md
View file @
030b8eab
File moved
src/
pages
/course_ocaml_expert.md
→
src/
content
/course_ocaml_expert.md
View file @
030b8eab
File moved
src/
pages
/course_rust_vocational_training.md
→
src/
content
/course_rust_vocational_training.md
View file @
030b8eab
File moved
src/
pages
/expertise.md
→
src/
content
/expertise.md
View file @
030b8eab
File moved
src/
pages
/index.md
→
src/
content
/index.md
View file @
030b8eab
File moved
src/
pages
/jobs.md
→
src/
content
/jobs.md
View file @
030b8eab
File moved
src/
pages
/legal-notice.md
→
src/
content
/legal-notice.md
View file @
030b8eab
File moved
src/
pages
/research-and-development.md
→
src/
content
/research-and-development.md
View file @
030b8eab
File moved
src/
pages
/team.md
→
src/
content
/team.md
View file @
030b8eab
File moved
src/
pages
/trainings.md
→
src/
content
/trainings.md
View file @
030b8eab
File moved
src/dune
View file @
030b8eab
(executable
(name server)
(modules
assets
server
pages
template)
(modules
content
server template)
(libraries dream omd))
(rule
...
...
@@ -10,19 +10,10 @@
(run dream_eml %{deps} --workspace %{workspace_root})))
(rule
(target
assets
.ml)
(target
content
.ml)
(deps
(source_tree
assets
))
(source_tree
content
))
(action
(with-stdout-to
%{null}
(run ocaml-crunch -m plain assets -o %{target}))))
(rule
(target pages.ml)
(deps
(source_tree pages))
(action
(with-stdout-to
%{null}
(run ocaml-crunch -m plain pages -o %{target}))))
(run ocaml-crunch -m plain content -o %{target}))))
src/server.ml
View file @
030b8eab
...
...
@@ -2,12 +2,12 @@ let render ~lang ~title ~content =
Template
.
render_unsafe
~
lang
~
title
~
content
:
(
Dream
.
html_escape
content
)
let
asset_loader
_root
path
_request
=
match
Assets
.
read
path
with
match
Content
.
read
(
"assets/"
^
path
)
with
|
None
->
Dream
.
empty
`Not_Found
|
Some
asset
->
Dream
.
respond
asset
let
page
path
=
match
Pages
.
read
(
path
^
".md"
)
with
match
Content
.
read
(
path
^
".md"
)
with
|
None
->
None
|
Some
page
->
Some
(
Omd
.
of_string
page
|>
Omd
.
to_html
)
...
...
Prev
1
2
3
4
Next
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