Skip to content

Commit

Permalink
Merge branch 'main' into dev-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonichigo authored Dec 31, 2024
2 parents 0921c2d + 8141a95 commit feeaf56
Show file tree
Hide file tree
Showing 58 changed files with 1,242 additions and 80 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/vale-lint-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check Docusaurus docs with Vale linter

on: [pull_request]

jobs:
vale:
name: Vale doc linter
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

# Set up Vale Action
- uses: errata-ai/[email protected]
with:
# Filter mode can be set to: added, diff_context, file, nofilter
filter_mode: nofilter
# Set the reporter to display the output: github-pr-check, github-pr-review, github-check
reporter: github-pr-check
# Fails the action if there are errors
fail_on_error: true
# Lint the files in the "versioned_docs/version-2.0.0/" directory
files: 'versioned_docs/version-2.0.0'
# Specify the Vale version
version: 3.0.3
env:
# GitHub token for authentication, automatically set by GitHub Actions
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25 changes: 25 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# vale.ini

StylesPath = vale_styles # Update this path to where your styles are stored.
MinAlertLevel = error # Set the minimum alert level to display (suggestion, warning, or error).
Vocab = Base

[*.md]
# Enable Markdown-specific styles.
BasedOnStyles = Vale, Google

# Customize specific rules based on your needs.
List.Capitalization = YES

# Override some rules:
Vale.Spelling = YES
Google.PassiveVoice = NO # Disable passive voice rule if unnecessary
Google.We = NO # Disable first-person plural flagging
Google.Will = NO # Allow "will" usage
Google.Exclamation = NO # Allow exclamation points
Google.Ellipses = NO # Allow ellipses in text
Google.Latin = NO # Allow "e.g." and "i.e." instead of "for example"

# Allow specific terms:
Vale.Terms=NO

54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,60 @@ npm start

The command starts a local development server and opens a browser window.

## Running Vale Locally for Documentation Linting

To help maintain consistency in our documentation, we use Vale, a syntax-aware linter that checks for spelling, grammar, and style issues.

### Installation

**Step 1: Install Vale**

If you're on macOS, you can install Vale using Homebrew:

```bash
brew install vale
```

Alternatively, you can install Vale manually:

1. Download Vale: Visit the Vale Releases page and download the latest version for your operating system.

2. Install Vale:

- On macOS and Linux, extract the binary, move it to /usr/local/bin, and make it executable:

```bash
sudo mv vale /usr/local/bin/
sudo chmod +x /usr/local/bin/vale
```

- On Windows, follow the instructions in the downloaded .zip file.

**Step 2: Configure Vale**

1. Ensure you have the .vale.ini configuration file in the root directory.

2. Check that StylesPath in .vale.ini points to the vale_styles directory (where custom styles are stored):

```ini
StylesPath = vale_styles
MinAlertLevel = error
```

### Running Vale

1. Linting Documentation: To check all markdown files in versioned_docs/version-2.0.0/ for errors, run:

```bash
vale versioned_docs/version-2.0.0/**/*.md
```

2. Review Errors:

- Vale will output any issues directly in the terminal. Address these issues in the markdown files to maintain style consistency.

Note: Running Vale locally helps catch issues early, ensuring a smooth review process when you submit a pull request.

## Prettier

1. Fork the repository
Expand Down
6 changes: 5 additions & 1 deletion src/components/Community.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Community = () => {
Are you curious, 🤔 or do you have questions burning in your mind? 🔥
Look no further! Join our lively Community Forum where you can:
</p>
<ul className="grid gap-6 sm:grid-cols-2 xl:gap-8">
<ul className="grid gap-6 sm:grid-cols-2 xl:gap-8 list-none">
{/*<li>*/}
{/* <a*/}
{/* href="https://community.keploy.io/"*/}
Expand Down Expand Up @@ -46,7 +46,9 @@ export const Community = () => {
>
<svg
fill="currentColor"
// Hotfix: add viewBox to prevent icon from being cut off after tailwind preflight disabled
className="h-12 w-12 flex-none text-red-500 "
viewBox="0 0 48 48"
>
<rect width="48" height="48" rx="12" />
<path
Expand Down Expand Up @@ -94,7 +96,9 @@ export const Community = () => {
>
<svg
fill="currentColor"
// Hotfix: add viewBox to prevent icon from being cut off after tailwind preflight disabled
className="h-12 w-12 flex-none text-black "
viewBox="0 0 48 48"
>
<rect width="48" height="48" rx="12" />
<path
Expand Down
172 changes: 170 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@
@tailwind utilities;

:root {
/* Hotfix: Changed primary color to black to resolve conflict with Docusaurus' default primary orange after disabling Tailwind preflight CSS. Added font size and line height adjustments to compensate for the removal of Tailwind preflight. */

/* --ifm-color-primary-lighter: #ffb575; */
font-size:18px;
line-height: 1.6;
--ifm-color-primary: #000;

--ifm-color-primary-lighter: #FFF;
--ifm-color-primary: #ff914d;
--ifm-color-primary-dark: #e67643;
--ifm-color-primary-darker: #c95919;
--ifm-color-primary-darkest: #be2c1b;
--ifm-color-primary-light: #ffd0a0;
--ifm-color-primary-lighter: #ffb575;

--ifm-color-primary-lightest: #ffceb1;
--ifm-code-font-size: 95%;
--doc-sidebar-width: 275px !important;
Expand All @@ -27,12 +35,17 @@
}

html[data-theme="dark"] {
/* Hotfix: Changed 'ifm-color-primary-lighter' to white to resolve conflict with Docusaurus' default color after disabling Tailwind preflight CSS. */


/* --ifm-color-primary-lighter: #ffb575; */
--ifm-color-primary-lighter: #FFF;

--ifm-color-primary: #ff914d;
--ifm-color-primary-dark: #e67643;
--ifm-color-primary-darker: #c95919;
--ifm-color-primary-darkest: #be2c1b;
--ifm-color-primary-light: #ffd0a0;
--ifm-color-primary-lighter: #ffb575;
--ifm-color-primary-lightest: #ffceb1;
--ifm-link-color: var(--ifm-color-primary-lighter);
--ifm-menu-color-active: var(--ifm-color-primary-lighter);
Expand Down Expand Up @@ -97,6 +110,10 @@ html[data-theme="light"] {
@apply inline;
}

/* Hotfix: Remove extra margin-bottom on community links subtext in the home page due to Tailwind preflight removal */
h3{
margin-bottom: 0.1rem;
}
h1,
h2,
h3,
Expand Down Expand Up @@ -316,6 +333,16 @@ footer svg {
font-weight: 600;
}

/* Reset margin bottom on h3 (refer docs community section li item heading) after disabling tailwind preflight. */
h3{
margin-bottom: 1px;
}

/* Reset any border-radius applied to images inside <td> elements. (see os icons and cross and tick icons in table) */
td img {
border-radius: 0 !important;
}

.related-read-link {
margin-left: 7px;
}
Expand Down Expand Up @@ -554,3 +581,144 @@ a[class="breadcrumbs__link"] {
[data-theme="dark"] th {
color: white;
}

/* Hotfix: Manually add Tailwind preflight styles to fix clipboard issues in Safari.
Using `preflight: true` caused style conflicts, so these styles are directly included here. */*,
::before,
::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: theme('borderColor.DEFAULT', currentColor);
}

* {
margin: 0;
}

html {
height: 100%;
line-height: 1.5;
-webkit-text-size-adjust: 100%;
-moz-tab-size: 4;
tab-size: 4;
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif);
}

body {
height: 100%;
line-height: inherit;
}

img,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
vertical-align: middle;
}

img,
video {
max-width: 100%;
height: auto;
}

input,
button,
textarea,
select {
font: inherit;
color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}

#root,
#__next {
isolation: isolate;
}

html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
background-color: transparent;
background-image: none;
}

:-moz-focusring {
outline: auto;
}

table {
border-collapse: collapse;
}

ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}

:disabled {
cursor: default;
}

:focus-visible {
outline: 2px solid theme('colors.blue.600', #2563eb);
outline-offset: 2px;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}

hr {
height: 0;
color: inherit;
border-top-width: 1px;
}

abbr:where([title]) {
text-decoration: underline dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}

a {
color: inherit;
text-decoration: inherit;
}

textarea {
resize: vertical;
}
4 changes: 2 additions & 2 deletions src/pages/concepts/reference/glossary.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function Glossary() {
],
G: [
{
name: "Grey Box Testing",
link: "/docs/concepts/reference/glossary/grey-box-testing",
name: "Gray Box Testing",
link: "/docs/concepts/reference/glossary/gray-box-testing",
},
],
I: [
Expand Down
Binary file added static/img/glossary/junit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/keploy_VS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/mocha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/nunit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/pytest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/rspec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/glossary/testng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ module.exports = {
"./src/pages/**/*.{js,ts,jsx,tsx}",
"./src/theme/**/*.{js,ts,jsx,tsx}",
],
// corePlugins: {
// // preflight: false, // to use Docusaurus base styles
// // container: false, // use container style from docusaurus
// },
// // important: "#tailwind", // incrementally adopt Tailwind by wrapping pages with <div id="tailwind"> </div>
/* Hotfix: Disable Tailwind's preflight to resolve clipboard functionality issues in Safari */
corePlugins: {
preflight: false, // to use Docusaurus base styles
// container: false, // use container style from docusaurus
},
// important: "#tailwind", // incrementally adopt Tailwind by wrapping pages with <div id="tailwind"> </div>
theme: {
extend: {
typography: {
Expand Down Expand Up @@ -102,7 +103,8 @@ module.exports = {
},
fontFamily: {
light: ["Roboto Light", "sans"],
bold: ["Roboto Bold", "sans"],
/* Disable Roboto Bold to prevent fallback to Times font for highlighted text in the right article index sidebar and h3 elements on the homepage */
// bold: ["Roboto Bold", "sans"],
},
keyframes: {
"fade-in-down": {
Expand Down
Loading

0 comments on commit feeaf56

Please sign in to comment.