Skip to content

Commit

Permalink
Merge branch 'main' into alexlmiller-docathon-2
Browse files Browse the repository at this point in the history
  • Loading branch information
janniks committed Oct 2, 2023
2 parents 4a8be70 + 4ae96a7 commit 6c3919b
Show file tree
Hide file tree
Showing 8 changed files with 635 additions and 585 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@ This repository holds the source for the Hiro developer documentation website, w

Use the following command to install local build and development dependencies.

`yarn`
```sh
yarn
```

## Local Development

The following command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. Make sure that you have [installed dependencies](#installation) before doing local development.

`yarn start`
```sh
yarn start
```

## Build

The following command will build the final static website into the `build` directory.

`yarn build`
```sh
yarn build
```

### Deployment

Expand Down
4 changes: 3 additions & 1 deletion docs/api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ There are multiple ways to interact with the API endpoints. In this guide, we wi
Using cURL, you will pass the API key in an `x-hiro-api-key` header. Use the following command as an example to call the API endpoint `https://api.hiro.so/<your-api-endpoint>`.
`curl https://api.hiro.so/... -H 'x-hiro-api-key: <your-API-value>'`
```sh
curl https://api.hiro.so/... -H 'x-hiro-api-key: <your-API-value>'
```
## Using the API key in Typescript
Expand Down
20 changes: 11 additions & 9 deletions docs/contributors-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ For larger edits or new documents, edit the docs locally, following the steps d
To submit a pull request to update the docs, fork the Hiro Docs repository and then clone it. Currently all Hiro docs are located in `/hirosystems/docs`

1. Create a branch and switch to that branch:

`git checkout -b <branch-name>`

```sh
git checkout -b <branch-name>
```

2. Add or modify the GitHub Markdown files in the directories.
3. When the suggested changes are complete, commit them with a message with a brief summary message:

`git commit -m "commit message"`

```sh
git commit -m "commit message"
```

4. Push the branch up:

`git push origin <branch-name>`

```sh
git push origin <branch-name>
```

When the changes are final, create a pull request from the working branch by following [GitHub's guide](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
Expand Down
41 changes: 21 additions & 20 deletions docs/platform/build-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ You can create a new contract for your project by following the steps below. Not
7. This will create a `.clar` file in the *contracts* folder. Now you can use the [clarity examples](https://github.com/hirosystems/clarity-examples) to customize your contract.
8. Once you are ready with your `.clar` file, you can update the `Clarinet.toml` file located in the same project directory. Use the following code to update the `.toml` file with these parameters. `[contracts.<your-contract-name>]` and path to use your `.clar` file name as `path = "<your-contract-name.clar>"`.

```
[project]
name = "CLARITY-EXAMPLES-5XE7"
requirements = []
[contracts.clarity_contract_1]
path = "clarity_contract_1.clar"
clarity_version = 1
epoch = "2.05"
```
```toml
[project]
name = "CLARITY-EXAMPLES-5XE7"
requirements = []
[contracts.clarity_contract_1]
path = "clarity_contract_1.clar"
clarity_version = 1
epoch = "2.05"
```

Save the file. You can now deploy your contracts in your project by referring to the [deploy project](deploy-project.md) guide.

## Add a new contract
Expand All @@ -59,17 +60,17 @@ You can now add a new contract by following **1-7** steps in the [write new cont

In the 8th step, where you edit the `Clarinet.toml` file, you will add two lines of code, as shown below. Note that the below code assumes that the newly added contract is *clarity_contract_2*. Also, add the path to your new contract as shown below.

```
[project]
name = "CLARITY-EXAMPLES-5XE7"
requirements = []
[contracts.clarity_contract_1.clar]
[contracts.clarity_contract_2.clar] --> new
path = "clarity_contract_1.clar"
path = "clarity_contract_2.clar" --> new
clarity_version = 1
epoch = "2.05"
```
```toml
[project]
name = "CLARITY-EXAMPLES-5XE7"
requirements = []
[contracts.clarity_contract_1.clar]
[contracts.clarity_contract_2.clar] # --> new
path = "clarity_contract_1.clar"
path = "clarity_contract_2.clar" # --> new
clarity_version = 1
epoch = "2.05"
```

### Test contract

Expand Down
Loading

0 comments on commit 6c3919b

Please sign in to comment.