From af578b5f9c0d4899f9610b055f8942d71c302f03 Mon Sep 17 00:00:00 2001 From: zeme-wana <15709674+zeme-wana@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:36:19 +0200 Subject: [PATCH] Fix broken links in docusaurus docs (#6232) --- .github/workflows/docusaurus-site.yml | 8 ++--- .github/workflows/haddock-site.yml | 33 +++++++++++-------- .github/workflows/metatheory-site.yml | 29 +++++++++------- README.adoc | 4 +-- doc/docusaurus/docs/index.md | 6 ++-- .../docs/reference/haddock-documentation.md | 10 +++--- 6 files changed, 52 insertions(+), 38 deletions(-) diff --git a/.github/workflows/docusaurus-site.yml b/.github/workflows/docusaurus-site.yml index c4b254d38a1..6297e8464e5 100644 --- a/.github/workflows/docusaurus-site.yml +++ b/.github/workflows/docusaurus-site.yml @@ -1,14 +1,14 @@ # This workflow builds and publishes the Docusaurus site to: # https://intersectmbo.github.io/plutus/docs -name: "๐Ÿฆ• Docusaurus Site" +name: "๐Ÿฆ• Deploy Docusaurus Site" on: workflow_dispatch: jobs: - publish: - name: Publish + deploy: + name: Deploy runs-on: [self-hosted, plutus-shared] permissions: contents: write @@ -20,7 +20,7 @@ jobs: - name: Build Site working-directory: doc/docusaurus - run: nix develop --command bash -c 'yarn && yarn build' + run: nix develop --accept-flake-config --command bash -c 'yarn && yarn build' - name: Deploy Site uses: JamesIves/github-pages-deploy-action@v4.6.1 diff --git a/.github/workflows/haddock-site.yml b/.github/workflows/haddock-site.yml index 115e8c54dc5..316db579fc4 100644 --- a/.github/workflows/haddock-site.yml +++ b/.github/workflows/haddock-site.yml @@ -3,31 +3,38 @@ # And optionally to: # https://intersectmbo.github.io/plutus/haddock/latest -name: "๐Ÿ“œ Haddock Site" +name: "๐Ÿ“œ Deploy Haddock Site" on: workflow_dispatch: inputs: - version: + ref: description: | - The release version tag. For example if $version == "1.29.0.0" then the - current contents of the branch tagged "1.29.0.0" will be deployed to: - https://intersectmbo.github.io/plutus/haddock/$version + The $ref to build off of, e.g. "1.29.0.0", "master", or any other valid git ref. + When making a release, this is usually the version tag, e.g. "1.29.0.0", and will be + equal to the $destination input below. When back-porting this could be a commit sha instead. required: true type: string + destination: + description: | + The $destination folder, e.g. when "1.29.0.0" the haddock will be deploy to: + https://intersectmbo.github.io/plutus/haddock/1.29.0.0 + required: true + type: string + latest: description: | - If true, then the $version branch will also be deployed to: + If true, then the haddock site will also be deploy to: https://intersectmbo.github.io/plutus/haddock/latest. - You want to leave this to true unless you are deploying old versions. + You want to leave this to true unless you are deploying old versions or back-porting. type: boolean required: true default: true - + jobs: - publish: - name: Publish + deploy: + name: Deploy runs-on: [self-hosted, plutus-shared] permissions: contents: write @@ -37,17 +44,17 @@ jobs: - name: Checkout uses: actions/checkout@main with: - ref: ${{ inputs.version }} + ref: ${{ inputs.ref }} - name: Build Site run: | - nix develop --command ./scripts/combined-haddock.sh _haddock all + nix develop --accept-flake-config --command ./scripts/combined-haddock.sh _haddock all - name: Deploy Site uses: JamesIves/github-pages-deploy-action@v4.6.1 with: folder: _haddock - target-folder: haddock/${{ inputs.version }} + target-folder: haddock/${{ inputs.destination }} single-commit: true - name: Deploy Site (latest) diff --git a/.github/workflows/metatheory-site.yml b/.github/workflows/metatheory-site.yml index a9ec1a8a0d3..ef2e6497076 100644 --- a/.github/workflows/metatheory-site.yml +++ b/.github/workflows/metatheory-site.yml @@ -4,31 +4,38 @@ # Optionally the $version branch can also be deployed to: # https://intersectmbo.github.io/plutus/metatheory/latest -name: "๐Ÿ”ฎ Metatheory Site" +name: "๐Ÿ”ฎ Deploy Metatheory Site" on: workflow_dispatch: inputs: - version: + ref: description: | - The release version tag. For example if $version == "1.29.0.0" then the - current contents of the branch tagged "1.29.0.0" will be deployed to: - https://intersectmbo.github.io/plutus/metatheory/$version + The $ref to build off of, e.g. "1.29.0.0", "master", or any other valid git ref. + When making a release, this is usually the version tag, e.g. "1.29.0.0", and will be + equal to the $destination input below. When back-porting this could be a commit sha instead. required: true type: string + destination: + description: | + The $destination folder, e.g. when "1.29.0.0" the metatheory will be deploy to: + https://intersectmbo.github.io/plutus/metatheory/1.29.0.0 + required: true + type: string + latest: description: | - If true, then the $version branch will also be deployed to: + If true, then the metatheory site will also be deploy to: https://intersectmbo.github.io/plutus/metatheory/latest. - You want to leave this to true unless you are deploying old versions. + You want to leave this to true unless you are deploying old versions or back-porting. type: boolean required: true default: true jobs: - publish: - name: Publish + deploy: + name: Deploy runs-on: [self-hosted, plutus-shared] permissions: contents: write @@ -38,7 +45,7 @@ jobs: - name: Checkout uses: actions/checkout@main with: - ref: ${{ inputs.version }} + ref: ${{ inputs.ref }} - name: Build Site run: | @@ -50,7 +57,7 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.6.1 with: folder: _site - target-folder: metatheory/${{ inputs.version }} + target-folder: metatheory/${{ inputs.destination }} single-commit: true - name: Deploy Latest diff --git a/README.adoc b/README.adoc index cd7f1bbcec3..8f2d19e6df4 100644 --- a/README.adoc +++ b/README.adoc @@ -44,9 +44,9 @@ After setting it up you should just be able to depend on the `plutus` packages a The main documentation is located https://intersectmbo.github.io/plutus/docs/[here]. -The haddock documentation is located https://intersectmbo.github.io/plutus/haddock/[here]. +The haddock documentation is located https://intersectmbo.github.io/plutus/haddock/latest[here]. -The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/[here]. +The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latest[here]. === Talks diff --git a/doc/docusaurus/docs/index.md b/doc/docusaurus/docs/index.md index 35666046fd2..c26ff6b134b 100644 --- a/doc/docusaurus/docs/index.md +++ b/doc/docusaurus/docs/index.md @@ -17,7 +17,7 @@ All of these elements are used in combination to write Plutus Core scripts that To develop and deploy a smart contract, you also need off-chain code for building transactions, submitting transactions, deploying smart contracts, querying for available UTXOs on the chain, and so on. You may also want a front-end interface for your smart contract for a better user experience. -Plutus allows all programming to be done from a [single Haskell library](https://intersectmbo.github.io/plutus/master/). This lets developers build secure applications, forge new assets, and create smart contracts in a predictable, deterministic environment with the highest level of assurance. Furthemore, developers donโ€™t have to run a full Cardano node to test their work. +Plutus allows all programming to be done from a [single Haskell library](https://intersectmbo.github.io/plutus/haddock/latest). This lets developers build secure applications, forge new assets, and create smart contracts in a predictable, deterministic environment with the highest level of assurance. Furthemore, developers donโ€™t have to run a full Cardano node to test their work. With Plutus you can: @@ -38,7 +38,7 @@ See, for example: - the [Cardano ledger specification](https://github.com/IntersectMBO/cardano-ledger#cardano-ledger) - the [Plutus Core specification](https://github.com/IntersectMBO/plutus#specifications-and-design) -- the [public Plutus code libraries](https://intersectmbo.github.io/plutus/master/) generated using Haddock. +- the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest) generated using Haddock. ## The Plutus repository @@ -46,7 +46,7 @@ The [Plutus repository](https://github.com/IntersectMBO/plutus) includes: * the implementation, specification, and mechanized metatheory of Plutus Core * the Plutus Tx compiler -* the combined documentation, generated using Haddock, for all the [public Plutus code libraries](https://intersectmbo.github.io/plutus/master/), such as `PlutusTx.List`, enabling developers to write Haskell code that can be compiled to Plutus Core. +* the combined documentation, generated using Haddock, for all the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest), such as `PlutusTx.List`, enabling developers to write Haskell code that can be compiled to Plutus Core. ## Educational resources diff --git a/doc/docusaurus/docs/reference/haddock-documentation.md b/doc/docusaurus/docs/reference/haddock-documentation.md index db6ca0ffeff..4f9af94a64e 100644 --- a/doc/docusaurus/docs/reference/haddock-documentation.md +++ b/doc/docusaurus/docs/reference/haddock-documentation.md @@ -6,12 +6,12 @@ sidebar_position: 3 ## Public Plutus code libraries -The documentation generated by Haddock provides a comprehehsive reference for the [public Plutus code libraries](https://intersectmbo.github.io/plutus/master/), an essential resource for developers working with Haskell and Plutus Core. +The documentation generated by Haddock provides a comprehehsive reference for the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest), an essential resource for developers working with Haskell and Plutus Core. ### Highlighted modules Highlighted modules in the documentation include the following: -- [PlutusTx](https://intersectmbo.github.io/plutus/master/plutus-tx/html/PlutusTx.html): compiling Haskell to PLC (Plutus Core; on-chain code) -- [PlutusTx.Prelude](https://intersectmbo.github.io/plutus/master/plutus-tx/html/PlutusTx-Prelude.html): Haskell prelude replacement compatible with PLC -- [PlutusCore](https://intersectmbo.github.io/plutus/master/plutus-core/html/PlutusCore.html): programming language in which scripts on the Cardano blockchain are written -- [UntypedPlutusCore](https://intersectmbo.github.io/plutus/master/plutus-core/html/UntypedPlutusCore.html): on-chain Plutus code. +- [PlutusTx](https://intersectmbo.github.io/plutus/haddock/latest/plutus-tx/html/PlutusTx.html): compiling Haskell to PLC (Plutus Core; on-chain code) +- [PlutusTx.Prelude](https://intersectmbo.github.io/plutus/haddock/latest/plutus-tx/html/PlutusTx-Prelude.html): Haskell prelude replacement compatible with PLC +- [PlutusCore](https://intersectmbo.github.io/plutus/haddock/latest/plutus-core/html/PlutusCore.html): programming language in which scripts on the Cardano blockchain are written +- [UntypedPlutusCore](https://intersectmbo.github.io/plutus/haddock/latest/plutus-core/html/UntypedPlutusCore.html): on-chain Plutus code.