Skip to content

(Refactor) Link to new api reference #401

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

Merged
merged 8 commits into from
Aug 19, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion __tests__/validateCodeSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,5 @@ function validateCodeSnippets(directoryPath: string): void {
describe("Validate code snippets", () => {
// We only validate code snippets in the API reference.
// However, we exclude Aptos for now because it's annoying (and doesn't seem worth it).
validateCodeSnippets("./pages/price-feeds/api-reference/evm");
validateCodeSnippets("./pages/price-feeds/api-reference/cosmwasm");
});
17 changes: 16 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,29 @@ const nextConfig = {
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},

async redirects() {
return permanentRedirectArray.map((value) => {
const permanentRedirects = permanentRedirectArray.map((value) => {
return {
source: value[0],
destination: value[1],
permanent: true,
};
});

return [
...permanentRedirects,
{
source: "/price-feeds/api-reference/evm/:slug",
destination: "https://api-reference.pyth.network/price-feeds/evm/:slug",
permanent: false,
},
{
source: "/price-feeds/api-reference/evm/",
destination: "https://api-reference.pyth.network/price-feeds/evm/",
permanent: false,
},
];
},
};

Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pages/price-feeds/api-reference/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"evm": "EVM",
"evm": {
"title": "EVM ↗",
"href": "https://api-reference.pyth.network/price-feeds/evm/getPriceNoOlderThan",
"newWindow": true
},
"aptos": "Aptos",
"cosmwasm": "CosmWasm",
"hermes": {
Expand Down
15 changes: 0 additions & 15 deletions pages/price-feeds/api-reference/evm.mdx

This file was deleted.

25 changes: 0 additions & 25 deletions pages/price-feeds/api-reference/evm/_meta.json

This file was deleted.

5 changes: 0 additions & 5 deletions pages/price-feeds/api-reference/evm/configuration.mdx

This file was deleted.

109 changes: 0 additions & 109 deletions pages/price-feeds/api-reference/evm/get-ema-price-no-older-than.mdx

This file was deleted.

102 changes: 0 additions & 102 deletions pages/price-feeds/api-reference/evm/get-ema-price-unsafe.mdx

This file was deleted.

Loading
Loading