Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add intra-site link instructions to docs #2276

Merged
merged 9 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/devGuide/bootcamp/contributeToDocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,40 @@ Check that the following are true:

</box>

## Adding Intra-Site Links to Documentation
tlylt marked this conversation as resolved.
Show resolved Hide resolved

Due to the way MarkBind's documentation is deployed, links from the developer guide that refer to the user guide, or vice versa, have to be differentiated with tags. MarkBind's documentation currently has 3 tags:
tlylt marked this conversation as resolved.
Show resolved Hide resolved

- `environment--combined` for locally served documentation
tlylt marked this conversation as resolved.
Show resolved Hide resolved
- `environment--ug` for deployed User Guide
- `environment--dg` for deployed Developer Guide

Using tags ensures that the correct link is created in each environment.

tlylt marked this conversation as resolved.
Show resolved Hide resolved
#### Developer Guide
%%LINK:%%
```markdown
[Link Title](/userGuide/newPage.html)
```

%%REPLACED WITH:%%
```html
<a tags="environment--combined" href="/userGuide/newPage.html">Link Title</a>
<a tags="environment--dg" href="https://markbind.org/userGuide/newPage.html">Link Title</a>
```

#### User Guide
%%LINK:%%
```markdown
[Link Title](/devGuide/newPage.html)
```

%%REPLACED WITH:%%
```html
<a tags="environment--combined" href="/devGuide/newPage.html">Link Title</a>
<a tags="environment--ug" href="https://markbind.org/devdocs/devGuide/newPage.html">Link Title</a>
```

## Make a Pull Request & Verify the PR Preview

Once you have made the changes, commit them and push them to your forked repository.
Expand Down
6 changes: 6 additions & 0 deletions docs/devGuide/bootcamp/implementAFeature.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ _(Same as what we mentioned in the previous task)_

By this time, you should have a good idea about how tests and documentation are written. Where possible, unit tests should also be added to ensure that the feature works as expected. Utilizing the new feature in our documentation is also encouraged so that we can get a better idea of how the feature can be used.

<box type="important" light>

When adding intra-site links, do remember to use tags to differentiate between the deployment environment when appropriate as mentioned in [Adding Intra-Site Links to Documentation](/devGuide/bootcamp/contributeToDocs.html#adding-intra-site-links-to-documentation)!

</box>

## Create PR & Follow up with the Reviews

_(Same as what we mentioned in the previous task)_
Expand Down