Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documentation site for Melange

NotificationsYou must be signed in to change notification settings

melange-re/melange-re.github.io

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.

Working locally

After cloning the repository, install the necessary JavaScript packages:

yarn

Then runmake dev from the folder where the repository lives.

(Optional) Fetch melange documentation API

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"

(Optional) Tooling for docs generation

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

Writing code snippets

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

Publishing is done automatically from GitHub actions:

Tracking new versions ofmelange in opam

When a new version ofmelange is published in opam, a new release of the docsand playground should be published. The process is as follows:

  • Updatedocumentation-site.opam to pointmelange andmelange-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 branchx.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 mainMakefile to 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 indocs/.vitepress/config.mts, underthemeConfig.nav setting, so that the first item is the one of the newversion, andunstable is shown last
  • Once the new version is published, we need to make sure other versions remainSEO friendly:
    • Inmaster: updateadd_canonical to point to the newvx.x.x, so thattheunstable version of the docs starts referring to that version as thecanonical one. To do so:
      • update the version inadd_canonical.ml
      • rundune test --auto-promote
    • Iny.y.y-patches: updateadd_canonical in versiony.y.y that was lastbefore, to point tovx.x.x as well. To do so:
      • update the version inadd_canonical.ml
      • rundune test --auto-promote
      • uncomment the relevant code inpublish-version.yml
  • In thegh-pages branch:
    • replace the default version with the new oneinindex.html
    • updaterobots.txt to point to the new version sitemap

Update docs for latest stable version

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:

  1. Checkout branch4.0.0-patches
  2. Cherry pick the commits you want to add
  3. Push your changes to the branch
  4. Runmake move-v4.0.0-tag to publish the branch tohttps://melange.re/v4.0.0/

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp