Skip to content

Commit

Permalink
docs: change to relative path to images so that astro build works
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimon-au committed Nov 28, 2024
1 parent 9775532 commit f74034c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/web/src/content/docs/guides/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,25 @@ For the hover display, Contextive is able to identify the use of defined terms i

It's quite common to combine a term from your language, such as `cargo` with a suffix such as `Id` (or `service`, or `factory`, etc.). If your code includes `cargoId`, `CargoId` or `cargo_id`, Contextive will identify the defined term `cargo` and display the definition and usage examples:

![Example of hovering over a combined word containing a match.](./src/assets/images/simple-auto-complete-demo.gif)
![Example of hovering over a combined word containing a match.](../../../assets/images/simple-auto-complete-demo.gif)

### Combining two (or more) terms

It's also common to end up with code elements (classes, variables or methods) that combine two or more terms from your language, such as `Leg` and `Policy`. Even if you haven't explicitly created a term for `LegPolicy`, Contextive will identify both words and show you both definitions at the same time:

![Example of hovering over a combined word with multiple matches.](./src/assets/images/multi-match-auto-complete-demo.gif)
![Example of hovering over a combined word with multiple matches.](../../../assets/images/multi-match-auto-complete-demo.gif)

### Multi-word terms

Sometimes, the combined term needs its own unique definition - just add it to your definitions file, and Contextive will work out that the more precise match is the one you want, decluttering your hover panel.

It can be added to your definitions file as either separate words (e.g. `Leg Magnitude Policy`) or as `PascalCase` or `camelCase` (e.g. `LegMagnitudePolicy`). Either way, once it's defined, the definitions of `Leg` and `Policy` will no longer be shown:

![Example of hovering over an exactly matching combined word.](./src/assets/images/leg_magnitude_policy_example.png)
![Example of hovering over an exactly matching combined word.](../../../assets/images/leg_magnitude_policy_example.png)

This also now works for `snake_case` code:

![Example of snake_case working in auto-complete and hover.](./src/assets/images/snake-case-auto-complete-demo.gif)
![Example of snake_case working in auto-complete and hover.](../../../assets/images/snake-case-auto-complete-demo.gif)

## Plural Words

Expand All @@ -99,7 +99,7 @@ Contextive supports defining a list of aliases for a given term. These can be a

When hovering over the word `unit`, the definition of `cargo` will be displayed:

![Example of hovering over the alias 'unit' for the term 'cargo'.](./src/assets/images/alias.png)
![Example of hovering over the alias 'unit' for the term 'cargo'.](../../../assets/images/alias.png)

## Multiline YAML

Expand All @@ -123,7 +123,7 @@ contexts:
Renders to:
![Example of literal multi-line with linebreak.](./src/assets/images/multiline_literal_linebreak.png)
![Example of literal multi-line with linebreak.](../../../assets/images/multiline_literal_linebreak.png)
### Multiline with New Paragraph
Expand All @@ -142,7 +142,7 @@ contexts:
Renders to:
![Example of literal multi-line with new paragraph.](./src/assets/images/multiline_literal_newpara.png)
![Example of literal multi-line with new paragraph.](../../../assets/images/multiline_literal_newpara.png)
### Multiline in No Newline in Hover
Expand All @@ -159,7 +159,7 @@ contexts:
Renders to:
![Example of literal multi-line with no break.](./src/assets/images/multiline_literal_nobreak.png)
![Example of literal multi-line with no break.](../../../assets/images/multiline_literal_nobreak.png)
The line will still wrap according to the width of the hover panel.
Expand All @@ -176,7 +176,7 @@ To ensure it's useful in a variety of scenarios, it includes a number of options
The auto-complete options will adjust as you type - e.g. after typing a single lower-case letter, only `camelCase` and `snake_case` will be included. After typing a single upper case letter, `PascalCase` and `UPPER_CASE` will be included. After typing two upper case letters, single word, snake_case and combined words will all be in `UPPERCASE`.

![Example of smart auto-complete.](./src/assets/images/markdown-demo.gif)
![Example of smart auto-complete.](../../../assets/images/markdown-demo.gif)

## Repository Organisation

Expand Down Expand Up @@ -218,11 +218,11 @@ Contextive will match the files to the path glob configurations.

When hovering over `CargoDemo/LegPolicy.cs` we get:

![Example of hovering over policy in the Cargo context.](./src/assets/images/leg_policy_example.png)
![Example of hovering over policy in the Cargo context.](../../../assets/images/leg_policy_example.png)

When hovering over `BillingDemo/Policy.cs` we get:

![Example of hovering over policy in the Billing context.](./src/assets/images/billing_policy_example.png)
![Example of hovering over policy in the Billing context.](../../../assets/images/billing_policy_example.png)

### Multiple Bounded Contexts, Multi-Root, Shared Definitions File

Expand Down

0 comments on commit f74034c

Please sign in to comment.