Skip to content

Commit a48e462

Browse files
fix: solved conflicts and reviewed content
2 parents 46abd9b + ccc70f5 commit a48e462

File tree

129 files changed

+1070
-2601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1070
-2601
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BACKEND_URL=
2+
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID=
3+
NEXT_PUBLIC_ALGOLIA_APP_ID=
4+
NEXT_PUBLIC_ALGOLIA_API_KEY=
5+
NEXT_PUBLIC_ALGOLIA_INDEX=
6+
NEWSLETTER_BASE_URL=

.env.local

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/deploy-production.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
env:
4040
BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }}
4141
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
42+
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
43+
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }}
44+
NEXT_PUBLIC_ALGOLIA_INDEX: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX }}
45+
NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }}
46+
SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }}
4247

4348
- name: Trigger Image Update
4449
run: |

.github/workflows/deploy-staging.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
env:
4040
BACKEND_URL: ${{ secrets.STAGING_NEXT_PUBLIC_BACKEND_URL }}
4141
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
42+
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
43+
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }}
44+
NEXT_PUBLIC_ALGOLIA_INDEX: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX }}
45+
NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }}
46+
SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }}
4247

4348
deploy:
4449
name: Deployment

.github/workflows/ephemeral-deploy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
env:
4141
BACKEND_URL: ${{ secrets.STAGING_NEXT_PUBLIC_BACKEND_URL }}
4242
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
43+
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
44+
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }}
45+
NEXT_PUBLIC_ALGOLIA_INDEX: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX }}
46+
NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }}
47+
SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }}
4348

4449
deploy:
4550
name: Ephermeral Deployment

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
FROM node:18-alpine
22

33
ARG BACKEND_URL=""
4+
ARG NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID=""
5+
ARG NEXT_PUBLIC_ALGOLIA_APP_ID=""
6+
ARG NEXT_PUBLIC_ALGOLIA_API_KEY=""
7+
ARG NEXT_PUBLIC_ALGOLIA_INDEX=""
8+
ARG NEWSLETTER_BASE_URL=""
9+
ARG SENDER_TOKEN=""
410

511
RUN apk add tree && corepack prepare [email protected] --activate && corepack enable
612

@@ -14,7 +20,12 @@ COPY . /app
1420
ENV NODE_ENV="production"
1521

1622
RUN echo BACKEND_URL="${BACKEND_URL}" > .env.local && \
23+
echo SENDER_TOKEN="${SENDER_TOKEN}" > .env.local && \
1724
echo NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID="${NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID}" >> .env.local && \
25+
echo NEXT_PUBLIC_ALGOLIA_APP_ID="${NEXT_PUBLIC_ALGOLIA_APP_ID}" >> .env.local && \
26+
echo NEXT_PUBLIC_ALGOLIA_API_KEY="${NEXT_PUBLIC_ALGOLIA_API_KEY}" >> .env.local && \
27+
echo NEXT_PUBLIC_ALGOLIA_INDEX="${NEXT_PUBLIC_ALGOLIA_INDEX}" >> .env.local && \
28+
echo NEWSLETTER_BASE_URL="${NEWSLETTER_BASE_URL}" >> .env.local && \
1829
pnpm build
1930

2031
ENTRYPOINT ["pnpm"]

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ Select the appropriate route, and create a new file ending in `.mdx`. Then, upda
1515
}
1616
```
1717

18-
## Deployments
19-
20-
### Staging Website
21-
22-
https://docs-staging.sandbox-london-b.fetch-ai.com/docs
23-
2418
## Developing
2519

2620
### Install dependencies

components/account-menu.tsx

Lines changed: 0 additions & 80 deletions
This file was deleted.

components/api-endpoint.tsx

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ import {
99
Tab,
1010
DropDownTabs,
1111
} from "./mdx";
12-
import { useUserContext } from "theme/fetch-ai-docs/contexts/context-provider";
1312
import Tooltip from "./tooltip";
1413
import Link from "next/link";
15-
import fetchJson from "src/lib/fetch-json";
1614

1715
interface PropertyType {
1816
name: string;
@@ -347,29 +345,27 @@ export const ApiEndpointRequestResponse: React.FC<{
347345
setIsModalOpen(false);
348346
};
349347

350-
const context = useUserContext();
351-
352-
const hitRequest = async () => {
348+
const hitRequestWithoutLogin = async () => {
353349
try {
354350
setLoading(true);
355351
setError("");
356352
const requestPayloadJSON = JSON.parse(requestPayload || "{}");
357353
const apiUrlWithParams = (properties.apiUrl +
358354
replacePathParameters(properties.path, pathParameters)) as string;
359-
360-
const response: { data: unknown } = await fetchJson(
361-
`/docs/api/api-requests?url=${apiUrlWithParams}`,
362-
{
363-
method: properties.method,
364-
body: properties.method.includes("GET") ? null : requestPayloadJSON,
355+
const response = await fetch(apiUrlWithParams, {
356+
method: properties.method,
357+
headers: {
358+
"Content-Type": "application/json",
359+
Authorization: `Bearer ${bearerToken}`,
365360
},
366-
);
367-
const responseText = JSON.stringify(response.data, null, 2);
361+
body: properties.method.includes("GET")
362+
? null
363+
: JSON.stringify(requestPayloadJSON),
364+
});
365+
const data = await response.json();
366+
const responseText = JSON.stringify(data, null, 2);
368367
setActualResponse(responseText);
369368
} catch (error) {
370-
if (error.response.status === 422) {
371-
context.signOut();
372-
}
373369
setError(`Error: ${error.message}`);
374370
} finally {
375371
setLoading(false);
@@ -420,7 +416,7 @@ export const ApiEndpointRequestResponse: React.FC<{
420416
</div>
421417
</div>
422418
<div className="nx-mt-2 nx-mb-4 nx-border-t nx-border-gray-300" />
423-
{!context?.isLoggedIn && isBearerTokenRequired && (
419+
{isBearerTokenRequired && (
424420
<div className="md:nx-flex nx-block nx-items-center nx-ml-4">
425421
<div className="nx-flex nx-gap-2 nx-w-1/4">
426422
<p className="nextra-content nx-text-sm">
@@ -530,7 +526,7 @@ export const ApiEndpointRequestResponse: React.FC<{
530526
<div className="nx-w-1/4">
531527
<button
532528
className="nx-bg-purple hover:nx-bg-purple-500 nx-text-white nx-py-2 nx-px-4 nx-rounded-xxl nx-text-sm nx-mt-6"
533-
onClick={hitRequest}
529+
onClick={hitRequestWithoutLogin}
534530
>
535531
Execute
536532
</button>

components/feature-guide-tabs.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ export const FeatureGuideTabs = ({ centerMode }: { centerMode?: boolean }) => {
4545
label: "Agents",
4646
content: [
4747
{
48-
title: "Installing the uAgents Framework 🛠️📲",
48+
title: "Installing the uAgents Framework",
4949
description:
5050
"A guide for installing the uAgents Framework correctly.",
5151
path: "guides/agents/installing-uagent",
5252
},
5353
{
54-
title: "Creating your first agent 🤖🧑‍💻",
54+
title: "Creating your first agent",
5555
description:
5656
"A guide showing how to create your first agent in few minutes.",
5757
path: "guides/agents/create-a-uagent",
5858
},
5959
{
60-
title: "How to use agents to verify messages 📬🔐",
60+
title: "How to use agents to verify messages",
6161
description: "A guide showing how to use agents to verify messages.",
6262
path: "guides/agents/message-verification",
6363
},
@@ -68,13 +68,13 @@ export const FeatureGuideTabs = ({ centerMode }: { centerMode?: boolean }) => {
6868
path: "guides/agents/register-in-almanac",
6969
},
7070
{
71-
title: "Communicating with other agents 📱🤖",
71+
title: "Communicating with other agents",
7272
description:
7373
"A guide showing different communication methods between agents.",
7474
path: "guides/agents/communicating-with-other-agents",
7575
},
7676
{
77-
title: "Agent address 🤖📫",
77+
title: "Agent address",
7878
description: "A guide showing how to retrieve agents addresses.",
7979
path: "guides/agents/getting-uagent-address",
8080
},
@@ -84,13 +84,13 @@ export const FeatureGuideTabs = ({ centerMode }: { centerMode?: boolean }) => {
8484
label: "Agentverse",
8585
content: [
8686
{
87-
title: "Creating an Agentverse hosted agent 🤖",
87+
title: "Creating an Agentverse hosted agent",
8888
description:
8989
"Use the Agentverse: My Agents tab to develop agents directly on the Agentverse platform.",
9090
path: "/guides/agentverse/creating-a-hosted-agent",
9191
},
9292
{
93-
title: "Utilizing the Agentverse Mailroom service 📬",
93+
title: "Utilizing the Agentverse Mailroom service",
9494
description:
9595
"Set up Agentverse mailboxes for your locally-run agents and to run them independently of your constant presence to run the server.",
9696
path: "/guides/agentverse/utilising-the-mailbox",
@@ -104,7 +104,7 @@ export const FeatureGuideTabs = ({ centerMode }: { centerMode?: boolean }) => {
104104
},
105105
{
106106
title:
107-
"Agentverse Functions: register a coin toss agent as a Function 🪙",
107+
"Agentverse Functions: register a coin toss agent as a Function",
108108
description:
109109
"Create and make an coin toss Function discoverable on the Agentverse and DeltaV!",
110110
path: "/guides/agentverse/registering-agent-coin-toss",
@@ -121,19 +121,19 @@ export const FeatureGuideTabs = ({ centerMode }: { centerMode?: boolean }) => {
121121
label: "Other",
122122
content: [
123123
{
124-
title: "Fetch Wallet 💵",
124+
title: "Fetch Wallet",
125125
description:
126126
"A guide helping you to get started with the Fetch wallet.",
127127
path: "/guides/fetch-network/fetch-wallet/fetch-wallet-getting-started",
128128
},
129129
{
130-
title: "How to convert FET to and from ERC20 🔄",
130+
title: "How to convert FET to and from ERC20",
131131
description:
132132
"A guide for converting Native FET to and from ERC-20 FET.",
133133
path: "/guides/fetch-network/how-to-convert-fet-to-and-from-erc20",
134134
},
135135
{
136-
title: "How to get testnet tokens via the Token Faucet 💰",
136+
title: "How to get testnet tokens via the Token Faucet",
137137
description:
138138
"Learn how to get testnet tokens using the Faucet service.",
139139
path: "/guides/fetch-network/ledger/faucet",

components/footer.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,16 @@ const Footer: React.FC = () => {
6868

6969
const [email, setEmail] = useState<string>("");
7070
const [message, setMessage] = useState<string>("");
71+
7172
const onClick = async () => {
73+
if (email === "") {
74+
setMessage("Please enter your email address.");
75+
return;
76+
} else if (!regex.test(email)) {
77+
setMessage("Please enter a valid email address.");
78+
return;
79+
}
80+
7281
const option = {
7382
method: "POST",
7483
headers: {
@@ -78,6 +87,7 @@ const Footer: React.FC = () => {
7887
};
7988
await fetch("/docs/api/newsletter", option);
8089
};
90+
8191
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
8292
const handleBlur = () => {
8393
if (email === "") {
@@ -87,6 +97,9 @@ const Footer: React.FC = () => {
8797
} else {
8898
setMessage("Please enter a valid email address.");
8999
}
100+
setTimeout(() => {
101+
setMessage("");
102+
}, 5000);
90103
};
91104

92105
return (
@@ -195,7 +208,7 @@ const Footer: React.FC = () => {
195208
<div className={styles.footerInputWrapper}>
196209
<div className={styles.footerInput}>
197210
<span className={styles.footerText}>
198-
Sign up to for developer updates
211+
Sign up for developer updates
199212
</span>
200213
<div className={styles.inputBox}>
201214
<input

components/landing-page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ function LandingPage() {
1515
const startingGuides = [
1616
{
1717
label: "Building your first agent",
18-
path: "/guides/agents/installing-uagent",
18+
path: "/guides/agents/quickstart",
1919
image: buildYourAgent,
2020
},
2121
{
2222
label: "Creating an executable function for AI",
23-
path: "guides/agents/communicating-with-other-agents",
23+
path: "/guides/agents/intermediate/agent-functions",
2424
image: executable,
2525
},
2626
{
2727
label: "The Fetch.ai technology stack",
28-
path: "/guides/agentverse/creating-a-hosted-agent",
28+
path: "/concepts/introducing-fetchai",
2929
image: techStack,
3030
},
3131
];

0 commit comments

Comments
 (0)