Skip to content

Commit

Permalink
[#2158] Add More Documentation for Title Component (#2159)
Browse files Browse the repository at this point in the history
Add More Documentation for Title Component

The documentation for the title component is sparse. Adding more
details on how to use it will make it easier for users to add their own
titles to their reports.

Let's update the documentation to include a section for the title
component, and add the title component to the default view.
  • Loading branch information
sopa301 committed Apr 18, 2024
1 parent 1e76355 commit 4cceaea
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def syncFrontendPublic = tasks.register('syncFrontendPublic', Sync) {
preserve {
include 'index.html'
include 'favicon.ico'
include 'title.md'
}
}

Expand Down
Binary file added docs/images/title-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/ug/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ The section below provides explanations for each of the flags.
<div id="section-assets">

**`--assets ASSETS_DIRECTORY`**: Specifies where to place assets for report generation.
* Parameter: `ASSETS_DIRECTORY` The directory containing the assets files. A `favicon.ico` file can be placed here to customize the favicon of the dashboard,
while a `title.md` file can be placed to customize the header of the report using [Markdown syntax](https://www.markdownguide.org/basic-syntax/).
* Parameter: `ASSETS_DIRECTORY` The directory containing the assets files. A `favicon.ico` file can be placed here to customize the favicon of the dashboard, while a `title.md` file can be placed to customize the [title](https://reposense.org/ug/customizingReports.html#add-a-title) of the report using [Markdown syntax](https://www.markdownguide.org/basic-syntax/).
* Alias: `-a`
* Example: `--assets ./assets` or `-a ./assets`

Expand Down
14 changes: 14 additions & 0 deletions docs/ug/customizingReports.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@ In both instances, it is **necessary to commit any changes** for them to be dete
</box>

3\. Add a git `.mailmap` file at the top-level of the repository, specifying mapped authors/commiters and/or e-mail addresses as per [gitmailmap documentation](https://git-scm.com/docs/gitmailmap). Any mappings specified here will be applied by git before all other RepoSense configurations. Configuration via `.mailmap` is particularly useful if you want the mapping to apply for all git commands as well instead of just for RepoSense.

<!-- ------------------------------------------------------------------------------------------------------ -->

### Add a title

A title component can be added by creating a file titled `title.md` in the assets directory. You can specify the assets directory according to the reference below:
{{ embed("Appendix: **CLI syntax reference → `assets` flag**", "cli.md#section-assets") }}

The title can render a combination of Markdown/HTML and plaintext ([example](https://github.com/reposense/RepoSense/blob/master/docs/ug/title.md)), and will appear on the top of the left panel as shown below:
![Title Component Example](../images/title-example.png)

Do note that the width of the title is bound by the width of the left panel.

For more information on how to use Markdown, see the [Markdown Guide](https://www.markdownguide.org/).
9 changes: 9 additions & 0 deletions docs/ug/title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# RepoSense

RepoSense is a powerful tool for analyzing repositories. It provides valuable insights into your codebase, helping you understand the development patterns, identify areas for improvement, and track the contributions of individual team members.

## Features

- Repository analysis: Gain a comprehensive overview of your codebase, including commit statistics, file changes, and code ownership.
- Contribution tracking: Easily track the contributions made by each team member, including the number of commits, lines of code added/removed, and more.
- Visualization: Visualize your repository's history and changes over time through interactive graphs and charts.
3 changes: 3 additions & 0 deletions frontend/public/title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# RepoSense

RepoSense is a powerful tool for analyzing repositories. It provides valuable insights into your codebase, helping you understand the development patterns, identify areas for improvement, and track the contributions of individual team members.

0 comments on commit 4cceaea

Please sign in to comment.