Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed Sep 17, 2024
1 parent 126e49b commit b69711b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 59 deletions.
6 changes: 1 addition & 5 deletions docs/mdsource/repom.generated.source.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# RepoM Core Repository Actions

## Configuration

This plugin has no configuration.

This module contains the following methods, variables and/or constants:
The following actions are part of the core of RepoM and can always be used in your RepositoryActions.

## browse-repository@1

Expand Down
2 changes: 1 addition & 1 deletion docs/mdsource/script_variables_file.generated.source.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `file`

Provides file related action menu functions and variables accessable through `file`.
Provides file related action menu functions and variables accessible through `file`.

This module contains the following methods, variables and/or constants:

Expand Down
62 changes: 9 additions & 53 deletions src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,69 +33,25 @@ end

{{~ ## include: _plugin_enable ## ~}}
To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
{{~ ##
- ProjectName: { { write_default_when_null plugin.ProjectName } }
- PluginName: { { write_default_when_null plugin.PluginName } }
- PluginDescription: { { write_default_when_null plugin.PluginDescription } }
- PluginMarkdownDescription: { { write_default_when_null plugin.PluginMarkdownDescription } }
## ~}}
{{~ else ~}}
# {{ plugin.IsPlugin ? plugin.PluginName : "RepoM Core Repository Actions" }}
{{~ end ~}}

## Configuration
{{~ if plugin.HasConfiguration ~}}
{{~ include 'plugin.configuration.scriban-txt' ~}}
{{ else }}
This plugin has no configuration.
{{ end ~}}
{{~ else ~}}
# {{ plugin.IsPlugin ? plugin.PluginName : "RepoM Core Repository Actions" }}
{{~ end ~}}
{{~ include '30' }}
{{~ if array.size(plugin.ActionMenus) > 0 ~}}
{{~ if plugin.IsPlugin ~}}
This module contains the following methods, variables and/or constants:
{{~ for member in plugin.ActionMenus ~}}

## {{ member.Name }}

{{ member.Description }}

Properties:

{{~ for p in member.ActionMenuProperties ~}}
- `{{ hyphenated p.CSharpName }}`: {{ p.Description }} ({{ write_type_with_link p.ReturnType }})
{{~ end ~}}
{{~ if member.Examples ~}}

### Example
{{~ if !string.empty member.Examples.Description ~}}
{{ member.Examples.Description | regex.replace `^\s{4}` '' 'm' | string.rstrip }}
{{ end }}
{{~ for example_item in member.Examples.Items ~}}
{{~ if example_item.TypeName == 'Code' ~}}

```{{ example_item.Language | string.downcase }}
{{~ if example_item.UseRaw ~}}
{{ example_item.Content | string.rstrip }}
{{~ else ~}}
{{ example_item.Content | regex.replace `^\s{4}` '' 'm' | string.rstrip }}
{{~ end ~}}
```

{{~ else if example_item.TypeName == 'Snippet' ~}}
{{ example_item.Mode | string.downcase }}: {{ example_item.Name }}

{{~ else if example_item.TypeName == 'Header' ~}}
#### {{ example_item.Text }}

{{~ else if example_item.TypeName == 'Text' ~}}
{{ example_item.Content }}
{{~ else if example_item.TypeName == 'Paragraph' ~}}

{{ example_item.Text }}
{{~ else ~}}
NAME NOT FOUND!! {{ example_item.TypeName }}.
{{~ end ~}}
{{~ end ~}}
{{~ end ~}}
{{~ else ~}}
The following actions are part of the core of RepoM and can always be used in your RepositoryActions.
{{~ end ~}}
{{~ for actionmenu_item in plugin.ActionMenus }}
{{~ include 'actionmenu.scriban-txt' ~}}
{{~ end ~}}
{{~ end ~}}
{{ include '99' ~}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## {{ actionmenu_item.Name }}

{{ actionmenu_item.Description }}

Properties:

{{~ for p in actionmenu_item.ActionMenuProperties ~}}
- `{{ hyphenated p.CSharpName }}`: {{ p.Description }} ({{ write_type_with_link p.ReturnType }})
{{~ end ~}}
{{~ if actionmenu_item.Examples ~}}

### Example
{{~ if !string.empty actionmenu_item.Examples.Description ~}}
{{ actionmenu_item.Examples.Description | regex.replace `^\s{4}` '' 'm' | string.rstrip }}
{{ end }}
{{~ for example_item in actionmenu_item.Examples.Items ~}}
{{~ if example_item.TypeName == 'Code' ~}}

```{{ example_item.Language | string.downcase }}
{{~ if example_item.UseRaw ~}}
{{ example_item.Content | string.rstrip }}
{{~ else ~}}
{{ example_item.Content | regex.replace `^\s{4}` '' 'm' | string.rstrip }}
{{~ end ~}}
```

{{~ else if example_item.TypeName == 'Snippet' ~}}
{{ example_item.Mode | string.downcase }}: {{ example_item.Name }}

{{~ else if example_item.TypeName == 'Header' ~}}
#### {{ example_item.Text }}

{{~ else if example_item.TypeName == 'Text' ~}}
{{ example_item.Content }}
{{~ else if example_item.TypeName == 'Paragraph' ~}}

{{ example_item.Text }}
{{~ else ~}}
NAME NOT FOUND!! {{ example_item.TypeName }}.
{{~ end ~}}
{{~ end ~}}
{{~ end ~}}

0 comments on commit b69711b

Please sign in to comment.