Skip to content

Commit ef4cbef

Browse files
Website and report corrections
1 parent 7da8bf2 commit ef4cbef

5 files changed

Lines changed: 30 additions & 2 deletions

File tree

examples/full-suite-report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6780,7 +6780,7 @@ <h1>full-suite</h1>
67806780
</div>
67816781

67826782
<div class="footer">
6783-
Generated by <a href="#">Nap API Testing</a>
6783+
Generated by <a href="https://napperapi.dev">Napper</a> &middot; Made by <a href="https://nimblesite.co">Nimblesite</a>
67846784
</div>
67856785

67866786
<script>

src/Nap.VsCode/src/constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ export const HTTP_METHODS = [
172172
"OPTIONS",
173173
] as const;
174174

175+
// Branding
176+
export const NAPPER_URL = "https://napperapi.dev";
177+
export const NIMBLESITE_URL = "https://nimblesite.co";
178+
export const REPORT_FOOTER_GENERATED_BY = "Generated by";
179+
export const REPORT_FOOTER_MADE_BY = "Made by";
180+
175181
// Logging
176182
export const LOG_CHANNEL_NAME = "Napper";
177183
export const LOG_PREFIX_INFO = "INFO";

src/Nap.VsCode/src/reportGenerator.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import * as path from "path";
66
import { type RunResult } from "./types";
77
import { escapeHtml, highlightJson } from "./htmlUtils";
88
import { REPORT_STYLES } from "./reportStyles";
9+
import {
10+
NAPPER_URL,
11+
NIMBLESITE_URL,
12+
REPORT_FOOTER_GENERATED_BY,
13+
REPORT_FOOTER_MADE_BY,
14+
} from "./constants";
915

1016
const buildReportAssertions = (result: RunResult): string => {
1117
if (result.assertions.length === 0) return "";
@@ -220,7 +226,7 @@ export const generatePlaylistReport = (
220226
</div>
221227
222228
<div class="footer">
223-
Generated by <a href="#">Napper</a>
229+
${REPORT_FOOTER_GENERATED_BY} <a href="${NAPPER_URL}">Napper</a> &middot; ${REPORT_FOOTER_MADE_BY} <a href="${NIMBLESITE_URL}">Nimblesite</a>
224230
</div>
225231
226232
<script>

website/eleventy.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ export default function (eleventyConfig) {
5757
return content;
5858
});
5959

60+
// Inject Nimblesite branding into footer
61+
const footerBranding = '<p>Made by <a href="https://nimblesite.co">Nimblesite</a></p>';
62+
eleventyConfig.addTransform("footer-branding", function (content) {
63+
if (this.page.outputPath?.endsWith(".html")) {
64+
return content.replace(
65+
'</div>\n </footer>',
66+
` ${footerBranding}\n </div>\n </footer>`
67+
);
68+
}
69+
return content;
70+
});
71+
6072
// Fix llms.txt: remove dead /api/ link
6173
eleventyConfig.addTransform("llms-fix", function (content) {
6274
if (this.page.outputPath === "llms.txt" || this.page.outputPath?.endsWith("/llms.txt")) {

website/src/_data/site.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"github": "https://github.com/MelbourneDeveloper/napper",
1111
"ogImage": "/assets/images/logo.png",
1212
"keywords": "API testing, HTTP client, VS Code extension, F# scripting, Postman alternative, Bruno alternative, CLI testing, REST API, test automation",
13+
"company": {
14+
"name": "Nimblesite",
15+
"url": "https://nimblesite.co"
16+
},
1317
"organization": {
1418
"name": "Napper",
1519
"url": "https://napperapi.dev",

0 commit comments

Comments
 (0)