Skip to content

Commit

Permalink
Are we yet -> Is OCaml yet
Browse files Browse the repository at this point in the history
  • Loading branch information
tmattio committed May 31, 2023
1 parent 0b7e122 commit 3b9cdca
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion data/are_we_yet/game.md → data/is_ocaml_yet/game.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: game
question: Are we game yet?
question: Is OCaml game yet?
answer: Not exactly, but hey, we have some building blocks!
categories:
- name: Animation
Expand Down
2 changes: 1 addition & 1 deletion data/are_we_yet/gui.md → data/is_ocaml_yet/gui.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: gui
question: Are we GUI yet?
question: Is OCaml GUI yet?
answer: Some hidden gems, we just need to a little bit of digging!
categories:
- name: Bindings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: learning
question: Are we learning yet?
question: Is OCaml learning yet?
answer: We're a bit late to the party, but we're catching up!
categories:
- name: Clustering
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: multicore
question: Are we multicore yet?
question: Is OCaml multicore yet?
answer: OCaml 5 is out, now we need to build an ecosystem!
categories:
- name: Async IO
Expand Down
2 changes: 1 addition & 1 deletion data/are_we_yet/web.md → data/is_ocaml_yet/web.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: web
question: Are we web yet?
question: Is OCaml web yet?
answer: Not quite yet, but we're getting there!
categories:
- name: Authentication
Expand Down
2 changes: 1 addition & 1 deletion src/global/url.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ let github_opam_file package_name package_version =
"https://github.com/ocaml/opam-repository/blob/master/packages/%s/%s.%s/opam"
package_name package_name package_version

let are_we_yet id = Printf.sprintf "/docs/are-we-%s-yet" id
let is_ocaml_yet id = Printf.sprintf "/docs/is-ocaml-%s-yet" id
4 changes: 2 additions & 2 deletions src/ocamlorg_data/data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@ module Code_example = struct
let get title = List.find (fun x -> String.equal x.title title) all
end

module Are_we_yet = struct
include Are_we_yet
module Is_ocaml_yet = struct
include Is_ocaml_yet
end
2 changes: 1 addition & 1 deletion src/ocamlorg_data/data.mli
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ module Code_example : sig
val get : string -> t
end

module Are_we_yet : sig
module Is_ocaml_yet : sig
type category = {
name : string;
status : string;
Expand Down
4 changes: 2 additions & 2 deletions src/ocamlorg_data/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
(public_name ocamlorg.data))

(rule
(target are_we_yet.ml)
(target is_ocaml_yet.ml)
(action
(with-stdout-to
%{target}
(run %{dep:../../tool/ood-gen/bin/gen.exe} are_we_yet))))
(run %{dep:../../tool/ood-gen/bin/gen.exe} is_ocaml_yet))))

(rule
(target academic_institution.ml)
Expand Down
14 changes: 7 additions & 7 deletions src/ocamlorg_frontend/components/learn_sidebar.eml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ let render
~extra_html:((render_tutorial_link ~title:"Best Practices" ~slug:"best-practices")
^ (render_tutorial_link ~title:"OCaml Platform" ~slug:"platform")) %>

<%s! Learn_layout.sidebar_link_group "Are we Yet"
(tutorial_sidebar_links_by_category "are-we-yet")
<%s! Learn_layout.sidebar_link_group "Is OCaml Yet"
(tutorial_sidebar_links_by_category "is-ocaml-yet")
~extra_html:(
(render_tutorial_link ~title:"Are we game yet?" ~slug:"are-we-game-yet")
^ (render_tutorial_link ~title:"Are we GUI yet?" ~slug:"are-we-gui-yet")
^ (render_tutorial_link ~title:"Are we learning yet?" ~slug:"are-we-learning-yet")
^ (render_tutorial_link ~title:"Are we multicore yet?" ~slug:"are-we-multicore-yet")
^ (render_tutorial_link ~title:"Are we web yet?" ~slug:"are-we-web-yet")) %>
(render_tutorial_link ~title:"Is OCaml game yet?" ~slug:"is-ocaml-game-yet")
^ (render_tutorial_link ~title:"Is OCaml GUI yet?" ~slug:"is-ocaml-gui-yet")
^ (render_tutorial_link ~title:"Is OCaml learning yet?" ~slug:"is-ocaml-learning-yet")
^ (render_tutorial_link ~title:"Is OCaml multicore yet?" ~slug:"is-ocaml-multicore-yet")
^ (render_tutorial_link ~title:"Is OCaml web yet?" ~slug:"is-ocaml-web-yet")) %>
4 changes: 2 additions & 2 deletions src/ocamlorg_frontend/dune
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
--workspace
%{workspace_root})))
(rule
(target are_we_yet.ml)
(target is_ocaml_yet.ml)
(action
(run %{bin:dream_eml} %{dep:are_we_yet.eml} --workspace %{workspace_root})))
(run %{bin:dream_eml} %{dep:is_ocaml_yet.eml} --workspace %{workspace_root})))
(rule
(target best_practices.ml)
(action
Expand Down
2 changes: 1 addition & 1 deletion src/ocamlorg_frontend/ocamlorg_frontend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Package = Package

let about = About.render
let academic_users = Academic_users.render
let are_we_yet = Are_we_yet.render
let is_ocaml_yet = Is_ocaml_yet.render
let best_practices = Best_practices.render
let blog = Blog.render
let blog_post = Blog_post.render
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
let render (meta : Data.Are_we_yet.t) ~tutorials ~packages =
let render (meta : Data.Is_ocaml_yet.t) ~tutorials ~packages =
Learn_layout.render
~title:meta.question
~description:(meta.question ^ " " ^ meta.answer)
~canonical:(Url.are_we_yet meta.id)
~canonical:(Url.is_ocaml_yet meta.id)
~active_top_nav_item:Header.Learn
~left_sidebar_html:(Learn_sidebar.render ~current_tutorial:(Some (Printf.sprintf "are-we-%s-yet" meta.id)) ~tutorials)
~left_sidebar_html:(Learn_sidebar.render ~current_tutorial:(Some (Printf.sprintf "is-ocaml-%s-yet" meta.id)) ~tutorials)
~right_sidebar_html:None @@
<h1 class="font-bold mb-8"><%s meta.question %></h1>
<p class="mt-6 text-xl leading-8"><%s meta.answer %></p>
<div class="mt-10 prose prose-orange max-w-3xl">
<%s! meta.body_html %>

<ul class="mt-8 px-0 font-light leading-8 text-neutral-800 text-lg">
<% meta.categories |> List.iter (fun (category : Data.Are_we_yet.category) -> %>
<% meta.categories |> List.iter (fun (category : Data.Is_ocaml_yet.category) -> %>
<li class="inline mr-3">
<a href="#<%s Utils.slugify category.name %>" class="font-light leading-10 text-left !text-blue-500 cursor-pointer hover:text-cyan-700"><span class="text-sm"><%s category.status %></span> <%s category.name %></a>
</li>
Expand All @@ -37,7 +37,7 @@ Learn_layout.render
</ul>
<div>
<h2>Details</h2>
<% meta.categories |> List.iter (fun (category : Data.Are_we_yet.category) -> %>
<% meta.categories |> List.iter (fun (category : Data.Is_ocaml_yet.category) -> %>
<h3 id="<%s Utils.slugify category.name %>">
<span class="text-base"><%s category.status %></span>
<%s category.name %>
Expand Down
8 changes: 4 additions & 4 deletions src/ocamlorg_web/lib/handler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,14 @@ let tutorial req =
~canonical:(Url.tutorial tutorial.slug)
tutorial)

let are_we_yet t id req =
let is_ocaml_yet t id req =
let</>? meta =
List.find_opt (fun x -> x.Data.Are_we_yet.id = id) Data.Are_we_yet.all
List.find_opt (fun x -> x.Data.Is_ocaml_yet.id = id) Data.Is_ocaml_yet.all
in
let tutorials = Data.Tutorial.all in
let packages =
meta.categories
|> List.concat_map (fun category -> category.Data.Are_we_yet.packages)
|> List.concat_map (fun category -> category.Data.Is_ocaml_yet.packages)
|> List.map Ocamlorg_package.Name.of_string
|> List.filter_map (fun name ->
match Ocamlorg_package.get_latest t name with
Expand All @@ -403,7 +403,7 @@ let are_we_yet t id req =
|> List.map (fun pkg -> (pkg.Ocamlorg_frontend.Package.name, pkg))
|> List.to_seq |> Hashtbl.of_seq
in
Dream.html (Ocamlorg_frontend.are_we_yet ~tutorials ~packages meta)
Dream.html (Ocamlorg_frontend.is_ocaml_yet ~tutorials ~packages meta)

let best_practices _req =
let tutorials = Data.Tutorial.all in
Expand Down
10 changes: 5 additions & 5 deletions src/ocamlorg_web/lib/router.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ let page_routes t =
Dream.get Url.papers Handler.papers;
Dream.get Url.best_practices Handler.best_practices;
Dream.get Url.problems Handler.problems;
Dream.get (Url.tutorial "are-we-game-yet") (Handler.are_we_yet t "game");
Dream.get (Url.tutorial "are-we-gui-yet") (Handler.are_we_yet t "gui");
Dream.get (Url.tutorial "are-we-learning-yet") (Handler.are_we_yet t "learning");
Dream.get (Url.tutorial "are-we-multicore-yet") (Handler.are_we_yet t "multicore");
Dream.get (Url.tutorial "are-we-web-yet") (Handler.are_we_yet t "web");
Dream.get (Url.tutorial "is-ocaml-game-yet") (Handler.is_ocaml_yet t "game");
Dream.get (Url.tutorial "is-ocaml-gui-yet") (Handler.is_ocaml_yet t "gui");
Dream.get (Url.tutorial "is-ocaml-learning-yet") (Handler.is_ocaml_yet t "learning");
Dream.get (Url.tutorial "is-ocaml-multicore-yet") (Handler.is_ocaml_yet t "multicore");
Dream.get (Url.tutorial "is-ocaml-web-yet") (Handler.is_ocaml_yet t "web");
Dream.get (Url.tutorial ":id") Handler.tutorial;
Dream.get Url.playground Handler.playground;
Dream.get Url.installer Handler.installer;
Expand Down
2 changes: 1 addition & 1 deletion tool/ood-gen/bin/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ open Cmdliner

let term_templates =
[
("are_we_yet", Ood_gen.Are_we_yet.template);
("is_ocaml_yet", Ood_gen.Is_ocaml_yet.template);
("academic_institution", Ood_gen.Academic_institution.template);
("book", Ood_gen.Book.template);
("job", Ood_gen.Job.template);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ let decode (_, (head, body_md)) =
of_metadata ~body_html metadata)
metadata

let all () = Utils.map_files decode "are_we_yet"
let all () = Utils.map_files decode "is_ocaml_yet"

let template () =
Format.asprintf
Expand Down

0 comments on commit 3b9cdca

Please sign in to comment.