- Notifications
You must be signed in to change notification settings - Fork7
Documentation site for Melange
melange-re/melange-re.github.io
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains the source for Melange public documentation site.
If you are looking for Melange source instead, it can be found inhttps://github.com/melange-re/melange.
Warning At the moment, this is awork in progress, opened to thepublic. The content and technology used to build the website are beingdeveloped and the website itself is not hosted yet on its final domain.
After cloning the repository, install the necessary JavaScript packages:
yarn
Then runmake dev from the folder where the repository lives.
Optionally, to fetch the melange odoc documentation and generate markdown into docs/api, you will need the melange package installed into your switch and run:
make pull-melange-docs SYNTAX="re"make pull-melange-docs SYNTAX="ml"
Optionally, to run some of the tools to auto-generate parts of thedocumentation, you will need an opam switch with the required dependencies. Toset it up, run:
make init
All code snippets should be written in OCaml syntax. A development-time scriptis available to automatically generate Reason syntax snippets from the OCamlones. Before running this script, you will need to set up an opam switch.Instructions can be found in the"Tooling for docsgeneration" section.
To run the script:
dune build @re
To promote any changes to the originalmd file, one can run:
dune build @re --auto-promote
Publishing is done automatically from GitHub actions:
- Every commit to
masterwill publish in theunstablefolder, i.e.https://melange.re/unstable - Every tag pushed with the
v*format will publish to a folder with the samename as the tag. For example, the branch with tagv4.0.0will publish tohttps://melange.re/v4.0.0/.
When a new version ofmelange is published in opam, a new release of the docsand playground should be published. The process is as follows:
- Update
documentation-site.opamto pointmelangeandmelange-playgroundpackages to the commit of the new release (they need to be pinned so that theMelange docs can be accessed on a stable path) - Update versions of the compiler listed in the playground (
app.jsx) - In the docs markdown pages, grep for the last version of Melange that was usedand replace it with the newer one.
- Open a PR with the changes above
- After merging the PR, create a new branch
x.x.x-patches. This branch will beused to publish any patches or improvements to that version of the docs /playground - In that branch, add a new command on the main
Makefileto publish a new tag,e.g.
.PHONY: move-vx.x.x-tagmove-vx.x.x-tag:## Moves the vx.x.x tag to the latest commit, useful to publish the vx docsgit push origin :refs/tags/vx.x.xgit tag -fa vx.x.xgit push origin --tags
- Call the newly created command to create a new version selectable from thewebsite:
make move-vx.x.x-tag - Update the navigation bar in
docs/.vitepress/config.mts, underthemeConfig.navsetting, so that the first item is the one of the newversion, andunstableis shown last - Once the new version is published, we need to make sure other versions remainSEO friendly:
- In
master: updateadd_canonicalto point to the newvx.x.x, so thattheunstableversion of the docs starts referring to that version as thecanonical one. To do so:- update the version in
add_canonical.ml - run
dune test --auto-promote
- update the version in
- In
y.y.y-patches: updateadd_canonicalin versiony.y.ythat was lastbefore, to point tovx.x.xas well. To do so:- update the version in
add_canonical.ml - run
dune test --auto-promote - uncomment the relevant code in
publish-version.yml
- update the version in
- In
- In the
gh-pagesbranch:- replace the default version with the new oneinindex.html
- update
robots.txtto point to the new version sitemap
After making changes in themaster branch, you may want some or all of thosechanges to appear in the latest stable version's docs. As an example, let's saythat the latest stable version is 4.0.0. Then you should:
- Checkout branch
4.0.0-patches - Cherry pick the commits you want to add
- Push your changes to the branch
- Run
make move-v4.0.0-tagto publish the branch tohttps://melange.re/v4.0.0/
About
Documentation site for Melange
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.