Skip to content

Commit

Permalink
refactor(vitepress): drop .html from local urls
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Feb 10, 2024
1 parent d56148e commit cd45bad
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 69 deletions.
129 changes: 62 additions & 67 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ export default defineConfig({
],
sitemap: {
hostname: 'https://docs.agoric.com',
transformItems: items => {
// include local redirects to preserve SEO
items.push(Object.keys(rewrites).map(url => ({ url })));
return items;
},
},
plugins: [],
/* --- ROUTE REWRITES / REDIRECTS --- */
Expand Down Expand Up @@ -181,11 +176,11 @@ export default defineConfig({
{ text: 'Getting Started', link: '/guides/getting-started/' },
{
text: 'Smart Wallet Dapp Architecture',
link: '/guides/getting-started/contract-rpc.html',
link: '/guides/getting-started/contract-rpc',
},
{
text: 'Deploying Smart Contracts',
link: '/guides/getting-started/deploying.html',
link: '/guides/getting-started/deploying',
},
],
},
Expand All @@ -196,7 +191,7 @@ export default defineConfig({
items: [
{
text: 'Smart Contract Basics',
link: '/guides/zoe/contract-basics.html',
link: '/guides/zoe/contract-basics',
},
{ text: 'Zoe Overview', link: '/guides/zoe/' },
],
Expand All @@ -209,7 +204,7 @@ export default defineConfig({
{ text: 'Agoric CLI Reference', link: '/guides/agoric-cli/' },
{
text: 'Using agd to make queries and transactions',
link: '/guides/agoric-cli/agd-query-tx.html',
link: '/guides/agoric-cli/agd-query-tx',
},
],
},
Expand All @@ -224,19 +219,19 @@ export default defineConfig({
},
{
text: 'Hardened JavaScript',
link: '/guides/js-programming/hardened-js.html',
link: '/guides/js-programming/hardened-js',
},
{
text: 'Eventual Send with E()',
link: '/guides/js-programming/eventual-send.html',
link: '/guides/js-programming/eventual-send',
},
{
text: 'Far(), Remotable, and Marshaling',
link: '/guides/js-programming/far.html',
link: '/guides/js-programming/far',
},
{
text: 'Notifiers and Subscriptions',
link: '/guides/js-programming/notifiers.html',
link: '/guides/js-programming/notifiers',
},
],
},
Expand All @@ -257,16 +252,16 @@ export default defineConfig({
{ text: 'ERTP Overview', link: '/guides/ertp/' },
{
text: 'Amounts, Values, and Brands',
link: '/guides/ertp/amounts.html',
link: '/guides/ertp/amounts',
},
{ text: 'AmountMath', link: '/guides/ertp/amount-math.html' },
{ text: 'AmountMath', link: '/guides/ertp/amount-math' },
{
text: 'Issuers and Mints',
link: '/guides/ertp/issuers-and-mints.html',
link: '/guides/ertp/issuers-and-mints',
},
{
text: 'Purses and Payments',
link: '/guides/ertp/purses-and-payments.html',
link: '/guides/ertp/purses-and-payments',
},
],
},
Expand All @@ -281,15 +276,15 @@ export default defineConfig({
},
{
text: 'Declaring Required Capabilities',
link: '/guides/coreeval/permissions.html',
link: '/guides/coreeval/permissions',
},
{
text: 'Code the Proposal',
link: '/guides/coreeval/proposal.html',
link: '/guides/coreeval/proposal',
},
{
text: 'Deploy a Governance Proposal to a Local Testnet',
link: '/guides/coreeval/local-testnet.html',
link: '/guides/coreeval/local-testnet',
},
],
},
Expand All @@ -301,72 +296,72 @@ export default defineConfig({
{ text: 'Example Zoe Contracts', link: '/guides/zoe/contracts/' },
{
text: 'Oracle Query Contract',
link: '/guides/zoe/contracts/oracle.html',
link: '/guides/zoe/contracts/oracle',
},
{
text: 'Vault Contract',
link: '/guides/zoe/contracts/vault.html',
link: '/guides/zoe/contracts/vault',
},
{ text: 'Loan Contract', link: '/guides/zoe/contracts/loan.html' },
{ text: 'Loan Contract', link: '/guides/zoe/contracts/loan' },
{
text: 'Funded Call Spread Contract',
link: '/guides/zoe/contracts/fundedCallSpread.html',
link: '/guides/zoe/contracts/fundedCallSpread',
},
{
text: 'Priced Call Spread Contract',
link: '/guides/zoe/contracts/pricedCallSpread.html',
link: '/guides/zoe/contracts/pricedCallSpread',
},
{
text: 'Covered Call Contract',
link: '/guides/zoe/contracts/covered-call.html',
link: '/guides/zoe/contracts/covered-call',
},
{
text: 'OTC Desk Contract',
link: '/guides/zoe/contracts/otc-desk.html',
link: '/guides/zoe/contracts/otc-desk',
},
{
text: 'ConstantProduct AMM Contract',
link: '/guides/zoe/contracts/constantProductAMM.html',
link: '/guides/zoe/contracts/constantProductAMM',
},
{
text: 'Sell Items Contract',
link: '/guides/zoe/contracts/sell-items.html',
link: '/guides/zoe/contracts/sell-items',
},
{
text: 'Atomic Swap Contract',
link: '/guides/zoe/contracts/atomic-swap.html',
link: '/guides/zoe/contracts/atomic-swap',
},
{
text: 'Barter Exchange Contract',
link: '/guides/zoe/contracts/barter-exchange.html',
link: '/guides/zoe/contracts/barter-exchange',
},
{
text: 'Second-Price Auction Contract',
link: '/guides/zoe/contracts/second-price-auction.html',
link: '/guides/zoe/contracts/second-price-auction',
},
{
text: 'Simple Exchange Contract',
link: '/guides/zoe/contracts/simple-exchange.html',
link: '/guides/zoe/contracts/simple-exchange',
},
{
text: 'Escrow To Vote Contract',
link: '/guides/zoe/contracts/escrow-to-vote.html',
link: '/guides/zoe/contracts/escrow-to-vote',
},
{
text: 'Mint Payments Contract',
link: '/guides/zoe/contracts/mint-payments.html',
link: '/guides/zoe/contracts/mint-payments',
},
{
text: 'Mint and Sell NFTs Contract',
link: '/guides/zoe/contracts/mint-and-sell-nfts.html',
link: '/guides/zoe/contracts/mint-and-sell-nfts',
},
{
text: 'Use Object Contract',
link: '/guides/zoe/contracts/use-obj-example.html',
link: '/guides/zoe/contracts/use-obj-example',
},
{
text: 'Automatic Refund Contract',
link: '/guides/zoe/contracts/automatic-refund.html',
link: '/guides/zoe/contracts/automatic-refund',
},
],
},
Expand All @@ -381,7 +376,7 @@ export default defineConfig({
},
{
text: 'PSM Contract',
link: '/guides/zoe/actual-contracts/PSM.html',
link: '/guides/zoe/actual-contracts/PSM',
},
],
},
Expand All @@ -393,19 +388,19 @@ export default defineConfig({
{ text: 'Agoric Dapps', link: '/guides/dapps/' },
{
text: 'Dapp Templates',
link: '/guides/dapps/dapp-templates.html',
link: '/guides/dapps/dapp-templates',
},
{
text: 'Starting Multiuser Dapps',
link: '/guides/dapps/starting-multiuser-dapps.html',
link: '/guides/dapps/starting-multiuser-dapps',
},
{
text: 'Deploying Smart Contracts',
link: '/guides/getting-started/deploying.html',
link: '/guides/getting-started/deploying',
},
{
text: 'Smart Wallet Dapp Architecture',
link: '/guides/getting-started/contract-rpc.html',
link: '/guides/getting-started/contract-rpc',
},
],
},
Expand All @@ -417,21 +412,21 @@ export default defineConfig({
},
{
text: 'Chainlink Integration',
link: '/guides/chainlink-integration.html',
link: '/guides/chainlink-integration',
collapsed: true,
items: [],
},
{
text: 'SubQuery Indexing',
link: '/guides/subquery-indexing.html',
link: '/guides/subquery-indexing',
collapsed: true,
items: [],
},
],
'/reference/': [
{
text: 'Wallet API',
link: '/reference/wallet-api.html',
link: '/reference/wallet-api',
collapsed: true,
items: [],
},
Expand All @@ -441,21 +436,21 @@ export default defineConfig({
collapsed: true,
items: [
{ text: 'ERTP API', link: '/reference/ertp-api/' },
{ text: 'Issuer Object', link: '/reference/ertp-api/issuer.html' },
{ text: 'Mint Object', link: '/reference/ertp-api/mint.html' },
{ text: 'Brand Object', link: '/reference/ertp-api/brand.html' },
{ text: 'Purse Object', link: '/reference/ertp-api/purse.html' },
{ text: 'Issuer Object', link: '/reference/ertp-api/issuer' },
{ text: 'Mint Object', link: '/reference/ertp-api/mint' },
{ text: 'Brand Object', link: '/reference/ertp-api/brand' },
{ text: 'Purse Object', link: '/reference/ertp-api/purse' },
{
text: 'Payment Object',
link: '/reference/ertp-api/payment.html',
link: '/reference/ertp-api/payment',
},
{
text: 'AmountMath Object',
link: '/reference/ertp-api/amount-math.html',
link: '/reference/ertp-api/amount-math',
},
{
text: 'ERTP Data Types',
link: '/reference/ertp-api/ertp-data-types.html',
link: '/reference/ertp-api/ertp-data-types',
},
],
},
Expand All @@ -467,15 +462,15 @@ export default defineConfig({
{ text: 'Agoric REPL', link: '/reference/repl/' },
{
text: 'Timer Services',
link: '/reference/repl/timerServices.html',
link: '/reference/repl/timerServices',
},
{ text: 'The Agoric Board', link: '/reference/repl/board.html' },
{ text: 'Network API', link: '/reference/repl/networking.html' },
{ text: 'The Agoric Board', link: '/reference/repl/board' },
{ text: 'Network API', link: '/reference/repl/networking' },
{
text: 'Price Authority',
link: '/reference/repl/priceAuthority.html',
link: '/reference/repl/priceAuthority',
},
{ text: 'Scratch', link: '/reference/repl/scratch.html' },
{ text: 'Scratch', link: '/reference/repl/scratch' },
],
},
{
Expand All @@ -484,32 +479,32 @@ export default defineConfig({
collapsed: true,
items: [
{ text: 'Zoe API', link: '/reference/zoe-api/' },
{ text: 'Zoe Service', link: '/reference/zoe-api/zoe.html' },
{ text: 'Zoe Service', link: '/reference/zoe-api/zoe' },
{
text: 'UserSeat Object',
link: '/reference/zoe-api/user-seat.html',
link: '/reference/zoe-api/user-seat',
},
{
text: 'Zoe Contract Facet',
link: '/reference/zoe-api/zoe-contract-facet.html',
link: '/reference/zoe-api/zoe-contract-facet',
},
{ text: 'ZCFSeat Object', link: '/reference/zoe-api/zcfseat.html' },
{ text: 'ZCFMint Object', link: '/reference/zoe-api/zcfmint.html' },
{ text: 'ZCFSeat Object', link: '/reference/zoe-api/zcfseat' },
{ text: 'ZCFMint Object', link: '/reference/zoe-api/zcfmint' },
{
text: 'PriceAuthority Object',
link: '/reference/zoe-api/price-authority.html',
link: '/reference/zoe-api/price-authority',
},
{
text: 'ZoeHelper Functions',
link: '/reference/zoe-api/zoe-helpers.html',
link: '/reference/zoe-api/zoe-helpers',
},
{
text: 'Ratio Math Functions',
link: '/reference/zoe-api/ratio-math.html',
link: '/reference/zoe-api/ratio-math',
},
{
text: 'Zoe Data Types',
link: '/reference/zoe-api/zoe-data-types.html',
link: '/reference/zoe-api/zoe-data-types',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion main/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ footer: Apache-2.0 Licensed | Copyright © 2023 - Agoric
text="Once you've completed the Getting Started, here are a few next steps."
/>
<h3 style="margin-top: 0em;">
<a href="/guides/js-programming/hardened-js.html">Learn the basics of HardenedJS</a>
<a href="/guides/js-programming/hardened-js">Learn the basics of HardenedJS</a>
</h3>
It's JavaScript with the safety you expect - see why MetaMask uses it to safely run their Snaps technology for 30M+ customers.
<h3>
Expand Down
2 changes: 1 addition & 1 deletion snippets/test-marshal.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const makeTranslationTable = (makeSlot, makeVal) => {
* 1. A message consisting of the method name `install`
* with the `bundle` argument is marshaled..."
*
* [1]: https://docs.agoric.com/guides/js-programming/eventual-send.html#eventual-send
* [1]: https://docs.agoric.com/guides/js-programming/eventual-send#eventual-send
*/
test.serial(
'marshal messages from E(zoe).install(), E(zoe).startInstance()',
Expand Down

0 comments on commit cd45bad

Please sign in to comment.