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

Auto docs testing #2721

Open
wants to merge 9 commits into
base: test-documentation-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 9 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: PR Workflow
on:
pull_request:
branches-ignore:
- 'master'
- "master"

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
Expand All @@ -33,12 +33,12 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17.0'
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "17.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.3'
channel: 'stable' # or: 'beta', 'dev' or 'master'
flutter-version: "3.22.3"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Set default branch.
run: git remote set-head origin --auto
shell: bash
Expand Down Expand Up @@ -94,7 +94,6 @@ jobs:
echo "Error: Close this PR and try again."
exit 1


Branch-check:
if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') }}
name: "Base branch check"
Expand Down Expand Up @@ -241,19 +240,19 @@ jobs:
name: Test Deployment to https://docs-mobile.talawa.io
runs-on: ubuntu-latest
needs: [iOS-Build, Android-Build]
# Run only if the develop-postgres branch and not dependabot
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: 'docs/'
node-version: "20.x"

# Run Docusaurus in the ./docs directory
- name: Install dependencies
working-directory: ./docs
run: yarn install --frozen-lockfile

- name: Test building the website
working-directory: ./docs
run: yarn build
Expand Down
17 changes: 17 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

echo "Generating documentation..."
npm run generate-docs
echo "Documentation generated."

# Calling HTML to MD conversion script
echo "Running HTML to Markdown conversion..."
.husky/scripts/convert_html_to_md.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build will fail because you have converted the .html to .md, and you have deleted the .html and readme files, but still there are links present in the .md file related to those deleted files.


# Removing unwanted files to clear space
rm -rf "docs/temp-docs"
find docs/docs/auto-docs -name '*.html' -delete
find docs/docs/auto-docs -name 'README.md' -delete

echo "Adding updated Markdown files to commit..."
git add docs/docs/auto-docs/
37 changes: 37 additions & 0 deletions .husky/scripts/convert_html_to_md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Input and Output directories
INPUT_DIR="docs/temp-docs" # Directory containing HTML files
OUTPUT_DIR="docs/docs/auto-docs" # Directory to store Markdown files

# Ensure output directory exists
mkdir -p "$OUTPUT_DIR"

# Function to convert HTML to Markdown
convert_html_to_md() {
local input_dir="$1"
local output_dir="$2"

# Recursively iterate through input directory
find "$input_dir" -type f -name "*.html" | while read -r html_file; do
# Generate relative path for output
relative_path=$(realpath --relative-to="$input_dir" "$html_file")

# Remove ".html" extension and generate target file path
target_md_file="$output_dir/${relative_path%.html}.md"

# Ensure the target directory exists
mkdir -p "$(dirname "$target_md_file")"

# Convert HTML to Markdown using pandoc
pandoc "$html_file" -o "$target_md_file"

# Log the conversion
echo "Converted: $html_file -> $target_md_file"
done
}

# Call the function
convert_html_to_md "$INPUT_DIR" "$OUTPUT_DIR"

echo "All HTML files successfully converted to Markdown."
239 changes: 239 additions & 0 deletions docs/docs/auto-docs/__404error.md

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions docs/docs/auto-docs/apptheme/AppTheme-class-sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
1. [Constructors](apptheme/AppTheme-class.html#constructors)
2. [AppTheme](apptheme/AppTheme/AppTheme.html)
3. [Properties](apptheme/AppTheme-class.html#instance-properties)
4. [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html)
5. [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html)
6. [Methods](apptheme/AppTheme-class.html#instance-methods)
7. [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)
8. [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)
9. [Operators](apptheme/AppTheme-class.html#operators)
10. [operator
==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)
11. [Static properties](apptheme/AppTheme-class.html#static-properties)
12. [bodyText1](apptheme/AppTheme/bodyText1.html)
13. [bodyText2](apptheme/AppTheme/bodyText2.html)
14. [bodyText3](apptheme/AppTheme/bodyText3.html)
15. [button](apptheme/AppTheme/button.html)
16. [headline1](apptheme/AppTheme/headline1.html)
17. [headline2](apptheme/AppTheme/headline2.html)
18. [headline3](apptheme/AppTheme/headline3.html)
19. [headline4](apptheme/AppTheme/headline4.html)
20. [headline5](apptheme/AppTheme/headline5.html)
21. [headline6](apptheme/AppTheme/headline6.html)
22. [overline](apptheme/AppTheme/overline.html)
23. [subtitle1](apptheme/AppTheme/subtitle1.html)
24. [subtitle2](apptheme/AppTheme/subtitle2.html)
25. [title](apptheme/AppTheme/title.html)
26. [Constants](apptheme/AppTheme-class.html#constants)
27. [blackPrimary](apptheme/AppTheme/blackPrimary-constant.html)
28. [blackSecondary](apptheme/AppTheme/blackSecondary-constant.html)
29. [blackTertiary](apptheme/AppTheme/blackTertiary-constant.html)
30. [blue](apptheme/AppTheme/blue-constant.html)
31. [green](apptheme/AppTheme/green-constant.html)
32. [grey](apptheme/AppTheme/grey-constant.html)
33. [lightGrey](apptheme/AppTheme/lightGrey-constant.html)
34. [primary](apptheme/AppTheme/primary-constant.html)
35. [red](apptheme/AppTheme/red-constant.html)
36. [secondary](apptheme/AppTheme/secondary-constant.html)
37. [shadow](apptheme/AppTheme/shadow-constant.html)
38. [tertiary](apptheme/AppTheme/tertiary-constant.html)
39. [white](apptheme/AppTheme/white-constant.html)
40. [yellow](apptheme/AppTheme/yellow-constant.html)
237 changes: 237 additions & 0 deletions docs/docs/auto-docs/apptheme/AppTheme-class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
::: {#overlay-under-drawer}
:::

::: {#title}
[menu]{#sidenav-left-toggle .material-symbols-outlined role="button"
tabindex="0"}

1. [talawa](../index.html)
2. [apptheme.dart](../apptheme/)
3. AppTheme class

::: self-name
AppTheme
:::

::: {#theme-button .toggle title="Toggle brightness"}
[ dark_mode ]{#dark-theme-button .material-symbols-outlined} [
light_mode ]{#light-theme-button .material-symbols-outlined}
:::
:::

::: {role="main"}
::: {#dartdoc-main-content .main-content above-sidebar="apptheme/apptheme-library-sidebar.html" below-sidebar="apptheme/AppTheme-class-sidebar.html"}
<div>

# [AppTheme]{.kind-class} class

</div>

::: {.section .desc .markdown}
Apptheme class.
:::

::: {#constructors .section .summary .offset-anchor}
## Constructors

[[AppTheme](../apptheme/AppTheme/AppTheme.html)]{.name}[()]{.signature}

:
:::

::: {#instance-properties .section .summary .offset-anchor .inherited}
## Properties

[[hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html)]{.name} [→ [int](https://api.flutter.dev/flutter/dart-core/int-class.html)]{.signature}
: The hash code for this object.
::: features
[no setter]{.feature}[inherited]{.feature}
:::

[[runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html)]{.name} [→ [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html)]{.signature}
: A representation of the runtime type of the object.
::: features
[no setter]{.feature}[inherited]{.feature}
:::
:::

::: {#instance-methods .section .summary .offset-anchor .inherited}
## Methods

[[noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)]{.name}[([[[Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html)]{.type-annotation} [invocation]{.parameter-name}]{#noSuchMethod-param-invocation .parameter}) [→ dynamic]{.returntype .parameter} ]{.signature}
: Invoked when a nonexistent method or property is accessed.
::: features
[inherited]{.feature}
:::

[[toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)]{.name}[() [→ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)]{.returntype .parameter} ]{.signature}
: A string representation of this object.
::: features
[inherited]{.feature}
:::
:::

::: {#operators .section .summary .offset-anchor .inherited}
## Operators

[[operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)]{.name}[([[[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)]{.type-annotation} [other]{.parameter-name}]{#==-param-other .parameter}) [→ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)]{.returntype .parameter} ]{.signature}
: The equality operator.
::: features
[inherited]{.feature}
:::
:::

::: {#static-properties .section .summary .offset-anchor}
## Static Properties

[[bodyText1](../apptheme/AppTheme/bodyText1.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[bodyText2](../apptheme/AppTheme/bodyText2.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[bodyText3](../apptheme/AppTheme/bodyText3.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[button](../apptheme/AppTheme/button.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline1](../apptheme/AppTheme/headline1.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline2](../apptheme/AppTheme/headline2.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline3](../apptheme/AppTheme/headline3.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline4](../apptheme/AppTheme/headline4.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline5](../apptheme/AppTheme/headline5.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[headline6](../apptheme/AppTheme/headline6.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[overline](../apptheme/AppTheme/overline.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[subtitle1](../apptheme/AppTheme/subtitle1.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[subtitle2](../apptheme/AppTheme/subtitle2.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::

[[title](../apptheme/AppTheme/title.html)]{.name} [↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)]{.signature}
: Custom theme for the app.
::: features
[getter/setter pair]{.feature}
:::
:::

::: {#constants .section .summary .offset-anchor}
## Constants

[[blackPrimary](../apptheme/AppTheme/blackPrimary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[blackSecondary](../apptheme/AppTheme/blackSecondary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[blackTertiary](../apptheme/AppTheme/blackTertiary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[blue](../apptheme/AppTheme/blue-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[green](../apptheme/AppTheme/green-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[grey](../apptheme/AppTheme/grey-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[lightGrey](../apptheme/AppTheme/lightGrey-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[primary](../apptheme/AppTheme/primary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Colors.

[[red](../apptheme/AppTheme/red-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[secondary](../apptheme/AppTheme/secondary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[shadow](../apptheme/AppTheme/shadow-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[tertiary](../apptheme/AppTheme/tertiary-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[white](../apptheme/AppTheme/white-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.

[[yellow](../apptheme/AppTheme/yellow-constant.html)]{.name} [→ const [Color](https://api.flutter.dev/flutter/painting/Color-class.html)]{.signature}
: Custom colors for the app.
:::
:::

::: {#dartdoc-sidebar-left .sidebar .sidebar-offcanvas-left}
::: {#header-search-sidebar .hidden-l}
:::

1. [talawa](../index.html)
2. [apptheme](../apptheme/)
3. AppTheme class

##### apptheme library

::: {#dartdoc-sidebar-left-content}
:::
:::

::: {#dartdoc-sidebar-right .sidebar .sidebar-offcanvas-right}
:::
:::

[ talawa 1.0.0+1 ]{.no-break}
Loading
Loading