Skip to content

Commit 40d0548

Browse files
committed
Plug in Rocq deployment repo (refman, stdlib and api).
1 parent 61edf47 commit 40d0548

16 files changed

+54
-240
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ COPY --from=build /home/opam/_build/default/src/ocamlorg_web/bin/main.exe /bin/s
3434

3535
COPY playground/asset playground/asset
3636

37-
RUN git clone https://github.com/ocaml-web/html-compiler-manuals /manual
37+
RUN git clone --depth=1 https://github.com/coq/doc /doc
3838

3939
RUN git config --global --add safe.directory /var/opam-repository
4040

4141
ENV OCAMLORG_REPO_PATH /var/opam-repository/
42-
ENV OCAMLORG_MANUAL_PATH /manual
42+
ENV DOC_PATH /doc
4343
ENV OCAMLORG_PKG_STATE_PATH /var/package.state
4444
ENV DREAM_VERBOSITY info
4545
ENV OCAMLORG_HTTP_PORT 8080
File renamed without changes.

doc/personas.md

Lines changed: 0 additions & 191 deletions
This file was deleted.

src/global/url.ml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ let install = "/install"
33
let packages = "/packages"
44
let packages_search = "/packages/search"
55
let packages_autocomplete_fragment = "/packages/autocomplete"
6-
76
let rocq_org = "https://rocq-prover.org"
87

98
module Package : sig
@@ -48,12 +47,19 @@ let about = "/about"
4847
let minor v =
4948
match String.split_on_char '.' v with
5049
| x :: y :: _ -> x ^ "." ^ y
51-
| _ -> invalid_arg (v ^ ": invalid OCaml version")
50+
| _ -> invalid_arg (v ^ ": invalid version")
51+
52+
let patch v =
53+
match String.split_on_char '.' v with
54+
| x :: y :: z :: _ -> x ^ "." ^ y ^ "." ^ z
55+
| _ -> invalid_arg (v ^ ": invalid version")
5256

5357
let v2 = "https://v2.ocaml.org"
54-
let manual_with_version v = "/manual/" ^ minor v ^ "/index.html"
55-
let manual = "/manual"
56-
let api_with_version v = "/manual/" ^ minor v ^ "/api/index.html"
58+
let manual_with_version v = "/doc/V" ^ patch v ^ "/refman/index.html"
59+
let manual = "/refman"
60+
let stdlib_with_version v = "/doc/V" ^ patch v ^ "/stdlib/index.html"
61+
let stdlib = "/stdlib"
62+
let api_with_version v = "/doc/V" ^ patch v ^ "/api/index.html"
5763
let api = "/api"
5864
let books = "/books"
5965
let changelog = "/changelog"

src/ocamlorg_frontend/components/footer.eml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ let resources = [
1010
(Url.install, "Install Rocq");
1111
(Url.getting_started, "Get Started");
1212
(Url.learn_platform, "Documentation");
13-
(Url.manual, "Language Manual");
14-
(Url.api, "Standard Library API");
13+
(Url.manual, "Reference Manual");
14+
(Url.stdlib, "Standard Library");
1515
(Url.books, "Books");
1616
(Url.exercises, "Exercises");
1717
(Url.papers, "Papers");

src/ocamlorg_frontend/components/header.eml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ let render
4141
=
4242
let search_dropdown () =
4343
<div id="header-search-results" aria-live="polite"></div>
44-
<a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-dark-primary" href="<%s Url.api %>">
45-
Standard Library API
44+
<a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-dark-primary" href="<%s Url.stdlib %>">
45+
Standard Library
4646
<%s! Icons.arrow_top_right_on_square "w-6 h-6" %>
4747
</a>
4848
in
@@ -129,7 +129,7 @@ in
129129
<li><%s! menu_link ~_class:"block" ~active:(active_top_nav_item=Some n) ~href:(url_of_nav_item n) ~title:(string_of_nav_item n) () %></li>
130130
<% ); %>
131131
<li>
132-
<a href="<%s Url.api %>" class="flex py-3 px-1 gap-4 font-semibold text-primary dark:text-dark-primary">Standard Library API<%s! Icons.arrow_top_right_on_square "w-6 h-6" %></a>
132+
<a href="<%s Url.stdlib %>" class="flex py-3 px-1 gap-4 font-semibold text-primary dark:text-dark-primary">Standard Library<%s! Icons.arrow_top_right_on_square "w-6 h-6" %></a>
133133
</li>
134134
<li class="mt-3 mb-6">
135135
<a href="<%s Url.getting_started %>" class="w-full rounded font-normal py-3 px-7 flex items-center justify-center bg-primary dark:bg-dark-primary text-white dark:text-dark-title">Get started</a>

src/ocamlorg_frontend/components/learn_components.eml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ let lang_manual_banner =
131131
<div class="flex flex-col flex-grow my-6">
132132
<div class="text-white text-sm font-medium tracking-widest leading-10">GUIDE</div>
133133
<h2 class="text-white text-3xl font-bold leading-10">
134-
Language Manual
134+
Reference Manual
135135
</h3>
136136
<p class="mt-4 text-white font-normal max-w-xl text-base leading-7">
137-
The Rocq prover manual is a comprehensive guide covering syntax, features, and usage. It assists developers and learners in understanding capabilities, best practices, and language features.
137+
The reference manual is the authoritative source of documentation for the Rocq prover. It contains a changelog describing updates to Rocq, which we recommend you read when you upgrade.
138138
</p>
139139
<div class="w-full md:w-80 mt-6 py-2 bg-white rounded-xl text-center text-primary dark:text-dark-primary hover:underline font-bold text-lg">
140140
Take Me There

src/ocamlorg_frontend/pages/home.eml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,18 +487,18 @@ Layout.render
487487
</a>
488488
<a href="<%s Url.manual %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
489489
<%s! Icons.document "h-16 w-16 mb-8" %>
490-
<p class="font-semibold text-xl mb-3">Language Manual</p>
491-
<p>Read the reference manual of the language.</p>
490+
<p class="font-semibold text-xl mb-3">Reference Manual</p>
491+
<p>The authoritative reference for the Rocq prover (not learning oriented).</p>
492492
</a>
493493
<a href="<%s Url.books %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
494494
<%s! Icons.book "h-16 w-16 mb-8" %>
495495
<p class="font-semibold text-xl mb-3">Books</p>
496496
<p>Discover Rocq books from expert programmers and researchers - from beginner level to advanced topics.</p>
497497
</a>
498-
<a href="<%s Url.api %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
498+
<a href="<%s Url.stdlib %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
499499
<%s! Icons.command_line "h-16 w-16 mb-8" %>
500500
<p class="font-semibold text-xl mb-3">Standard Library</p>
501-
<p>Searchable API documentation.</p>
501+
<p>The documentation of the standard library.</p>
502502
</a>
503503
<a href="<%s Url.exercises %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
504504
<%s! Icons.hand_palm "h-16 w-16 mb-8" %>
@@ -508,7 +508,7 @@ Layout.render
508508
<a href="<%s Url.papers %>" class="card dark:dark-card p-4 text-title dark:text-dark-white">
509509
<%s! Icons.papers "h-16 w-16 mb-8" %>
510510
<p class="font-semibold text-xl mb-3">Papers</p>
511-
<p>Explore papers that have influenced or used Rocq.</p>
511+
<p>Explore papers that have influenced or used the Rocq prover.</p>
512512
</a>
513513
</div>
514514
</div>

src/ocamlorg_frontend/pages/learn.eml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Learn_layout.single_column_layout
2626

2727
<div class="flex flex-col gap-4 md:gap-6 md:w-80">
2828
<%s! Hero_section.hero_button ~left_icon:(Icons.rocq "w-5 h-5") ~right_icon:(Icons.download "w-5 h-5") ~text:("Install Rocq " ^ latest_version) ~href:(Url.install) "" %>
29-
<%s! Hero_section.hero_button ~left_icon:(Icons.book "w-5 h-5") ~right_icon:(Icons.link "w-5 h-5") ~text:("Standard Library API") ~href:(Url.api) "" %>
29+
<%s! Hero_section.hero_button ~left_icon:(Icons.book "w-5 h-5") ~right_icon:(Icons.link "w-5 h-5") ~text:("Standard Library") ~href:(Url.stdlib) "" %>
3030
<%s! Hero_section.hero_button ~left_icon:(Icons.book "w-5 h-5") ~right_icon:(Icons.link "w-5 h-5") ~text:("Rocq Reference Manual") ~href:(Url.manual) "" %>
3131
</div>
3232
</div>

src/ocamlorg_frontend/pages/packages.eml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Layout.render
99

1010
let search_dropdown () =
1111
<div id="packages-search-results" aria-live="polite" ></div>
12-
<a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-[#F36528]" href="<%s Url.api %>">
13-
Standard Library API
12+
<a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-[#F36528]" href="<%s Url.stdlib %>">
13+
Standard Library
1414
<%s! Icons.arrow_top_right_on_square "w-6 h-6"%>
1515
</a>
1616
in

0 commit comments

Comments
 (0)