Skip to content

Commit

Permalink
Merge branch 'main' into elmar/dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ekenigs committed Jul 15, 2024
2 parents f1420d6 + 5da13ab commit 0b06b69
Show file tree
Hide file tree
Showing 54 changed files with 6,290 additions and 1,894 deletions.
2 changes: 1 addition & 1 deletion .github/pull-request-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Please explain the changes this PR addresses here.

### Checklist

- [ ] If this requires a documentation change, I have created a PR in [moonbeam-docs](https://github.com/moonbeam-foundation/moonbeam-docs) repository.
- [ ] If this requires a documentation change, I have created a PR that updates the `mkdocs/docs` directory
- [ ] If this requires it, I have updated the Readme
- [ ] If necessary, I have updated the examples
- [ ] I have verified if I need to create/update unit tests
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,6 @@ dist

# IntelliJ Idea
.idea

# Docs - Site directory
mkdocs/site
8 changes: 4 additions & 4 deletions examples/sdk-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"author": "",
"license": "MIT",
"dependencies": {
"@moonbeam-network/xcm-config": "2.4.3",
"@moonbeam-network/xcm-sdk": "2.4.3",
"@moonbeam-network/xcm-utils": "2.1.1"
"@moonbeam-network/xcm-config": "2.4.5",
"@moonbeam-network/xcm-sdk": "2.4.5",
"@moonbeam-network/xcm-utils": "2.1.2"
},
"devDependencies": {
"bun": "^1.1.18"
"bun": "^1.1.20"
}
}
72 changes: 72 additions & 0 deletions mkdocs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Documentation for the XCM SDK

This directory contains the XCM SDK documentation found at [https://moonbeam-foundation.github.io/xcm-sdk/latest/](https://moonbeam-foundation.github.io/xcm-sdk/latest/). It is generated using [MkDocs](https://www.mkdocs.org/) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material).

These docs are versioned and rely on [mike](https://github.com/jimporter/mike) to deploy new versions and manage existing ones. **Any updates to the documentation site require you to use mike to deploy the changes**, pushing changes to the `main` branch will **not** automatically publish the changes to the live site. You need to follow the [deployment process](#deployment-process).

## Get Started

Clone the `xcm-sdk` repository:

```bash
git clone https://github.com/moonbeam-foundation/xcm-sdk.git
```

Install the dependencies by navigating to the `mkdocs` directory and running:

```bash
pip install -r requirements.txt
```

This will install some essential dependencies, including MkDocs, Material for MkDocs, and mike.

## Deployment Process

The process for deploying new changes to the documentation site is as follows:

1. Make changes and merge them into the `main` branch
2. Run a `mike deploy` command to either [publish a new version](#publishing-new-versions) (which should only be done for major releases) or [publish changes to the current version](#publishing-changes-to-the-current-version)
3. Upon running the `deploy` command, mike will create a new Git commit on the `gh-pages` branch. When deploying changes to the current version, the previous docs for that version are erased and overwritten, but docs for other versions remain untouched
4. The new Git commit is picked up and published to the live docs site

Please note that modifying a previous version is possible, but should not be done unless necessary. It will require you to roll back changes to that version. For example, if the current version is v2 and you make a change and want to apply it to v0, the rest of the pages must be on v0, otherwise, the v2 changes will be applied to v0.

### Publishing New Versions

To add a new version for a major release, you'll need to run the following deployment command from the `mkdocs` directory:

```bash
mike deploy --push INSERT_NEW_VERSION
```

Where the version should be formatted like `v0`. We only need to worry about maintaining documentation for major version changes, so you shouldn't ever need to use `v0.1` or `v0.0.1` or anything along those lines.

**Note**: You can find the current version by looking at which version is the latest in the [`versions.json` file](https://github.com/moonbeam-foundation/xcm-sdk/blob/gh-pages/versions.json) on the `gh-pages` branch.

Then, you'll need to update the latest alias to the new version:

```bash
mike deploy --push --update-aliases INSERT_NEW_VERSION latest
```

Now when you go to the docs site, you'll be automatically taken to the new version.

### Publishing Changes to the Current Version

To make minor updates to the current version, you’ll need to run the following deployment command:

```bash
mike deploy --push INSERT_CURRENT_VERSION
```

**Note**: You can find the current version by looking at which version is the latest in the [`versions.json` file](https://github.com/moonbeam-foundation/xcm-sdk/blob/gh-pages/versions.json) on the `gh-pages` branch.

## Contributing

To contribute to the documentation, you'll need to make changes to the `mkdocs/docs` directory. Please follow the guidelines outlined in the [PaperMoon style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md).

Once you've [cloned the repository and installed the dependencies](#get-started), you can make changes as needed, and view them locally on port 8000, by running:

```bash
mkdocs serve
```
5 changes: 5 additions & 0 deletions mkdocs/docs/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nav:
- 'index.md'
- 'SDK Reference': 'reference'
- 'Using the XCM SDK': 'example-usage.md'
- 'Contribute': 'contribute.md'
1 change: 1 addition & 0 deletions mkdocs/docs/.snippets/text/endpoint-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To configure your project for Moonbeam or Moonriver, you will need to have your own endpoint and API key, which you can get from one of the supported [Endpoint Providers](https://docs.moonbeam.network/builders/get-started/endpoints){target=\_blank}.
3 changes: 3 additions & 0 deletions mkdocs/docs/.snippets/text/third-party-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="page-disclaimer">
The information presented herein has been provided by third parties and is made available solely for general information purposes. Moonbeam does not endorse any project listed and described on the Moonbeam Doc Website (https://docs.moonbeam.network/). Moonbeam Foundation does not warrant the accuracy, completeness or usefulness of this information. Any reliance you place on such information is strictly at your own risk. Moonbeam Foundation disclaims all liability and responsibility arising from any reliance placed on this information by you or by anyone who may be informed of any of its contents. All statements and/or opinions expressed in these materials are solely the responsibility of the person or entity providing those materials and do not necessarily represent the opinion of Moonbeam Foundation. The information should not be construed as professional or financial advice of any kind. Advice from a suitably qualified professional should always be sought in relation to any particular matter or circumstance. The information herein may link to or integrate with other websites operated or content provided by third parties, and such other websites may link to this website. Moonbeam Foundation has no control over any such other websites or their content and will have no liability arising out of or related to such websites or their content. The existence of any such link does not constitute an endorsement of such websites, the content of the websites, or the operators of the websites. These links are being provided to you only as a convenience and you release and hold Moonbeam Foundation harmless from any and all liability arising from your use of this information or the information provided by any third-party website or service.
</div>
Loading

0 comments on commit 0b06b69

Please sign in to comment.