diff --git a/package.json b/package.json index 4baafdbabd..0863f77d7c 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "dependencies": { "@appwrite.io/pink": "0.1.0-next.9", "@appwrite.io/pink-icons": "0.1.0-next.9", - "@appwrite.io/repo": "github:appwrite/appwrite", + "@appwrite.io/repo": "github:appwrite/appwrite#main", "@splinetool/viewer": "0.9.455", "compression": "^1.7.4", "express": "^4.18.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 079e3f270b..7eadfff29a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: 0.1.0-next.9 version: 0.1.0-next.9 '@appwrite.io/repo': - specifier: github:appwrite/appwrite - version: github.com/appwrite/appwrite/030f9629a69f7db0f3da3e76d1805383bb3a3acd + specifier: github:appwrite/appwrite#main + version: github.com/appwrite/appwrite/fce18647d2352e4cfce7ce75fd103a21bafbf7d0 '@splinetool/viewer': specifier: 0.9.455 version: 0.9.455 @@ -5570,8 +5570,8 @@ packages: engines: {node: '>=12.20'} dev: true - github.com/appwrite/appwrite/030f9629a69f7db0f3da3e76d1805383bb3a3acd: - resolution: {tarball: https://codeload.github.com/appwrite/appwrite/tar.gz/030f9629a69f7db0f3da3e76d1805383bb3a3acd} + github.com/appwrite/appwrite/fce18647d2352e4cfce7ce75fd103a21bafbf7d0: + resolution: {tarball: https://codeload.github.com/appwrite/appwrite/tar.gz/fce18647d2352e4cfce7ce75fd103a21bafbf7d0} name: '@appwrite.io/repo' version: 0.0.0 dev: false diff --git a/src/lib/utils/markdown.ts b/src/lib/utils/markdown.ts index 93f4d939bc..90e7e8318b 100644 --- a/src/lib/utils/markdown.ts +++ b/src/lib/utils/markdown.ts @@ -2,35 +2,38 @@ import MarkdownIt from 'markdown-it'; const md = new MarkdownIt('commonmark'); export function parse(content: string): string { - const tokens = md.parse(content, null); + const tokens = md.parse(content, null); - return md.renderer.render( - transform_tokens(tokens), - { - highlight: null - }, - null - ); + return md.renderer.render( + transform_tokens(tokens), + { + highlight: null + }, + null + ); } function transform_tokens(tokens: ReturnType): ReturnType { - return tokens.map((token) => { - if (token.children) { - token.children = transform_tokens(token.children); - } - switch (token.type) { - case 'paragraph_open': - token.attrPush(['class', 'aw-paragraph']); - break; - case 'link_open': - if (token.attrGet('href')?.startsWith('http')) { - token.attrPush(['target', '_blank']); - } - // disable links for now - token.attrSet('href', '#'); - token.attrPush(['class', 'aw-link']); - break; - } - return token; - }); + return tokens.map((token) => { + if (token.children) { + token.children = transform_tokens(token.children); + } + switch (token.type) { + case 'paragraph_open': + token.attrPush(['class', 'aw-paragraph']); + break; + case 'link_open': { + const href = token.attrGet('href'); + if (href?.startsWith('http')) { + if (!href.startsWith('https://appwrite.io')) { + token.attrPush(['rel', 'noopener noreferrer']); + token.attrPush(['target', '_blank']); + } + } + token.attrPush(['class', 'aw-link']); + break; + } + } + return token; + }); } diff --git a/src/routes/docs/references/[version]/[platform]/[service]/+page.svelte b/src/routes/docs/references/[version]/[platform]/[service]/+page.svelte index 0b8d941000..2c797e84a4 100644 --- a/src/routes/docs/references/[version]/[platform]/[service]/+page.svelte +++ b/src/routes/docs/references/[version]/[platform]/[service]/+page.svelte @@ -151,7 +151,7 @@
- {method.title} + {method.title}

{@html parse(method.description)} diff --git a/src/routes/docs/references/[version]/[platform]/[service]/descriptions/account.md b/src/routes/docs/references/[version]/[platform]/[service]/descriptions/account.md index 6818115fd1..2ad8ccf219 100644 --- a/src/routes/docs/references/[version]/[platform]/[service]/descriptions/account.md +++ b/src/routes/docs/references/[version]/[platform]/[service]/descriptions/account.md @@ -1,5 +1,5 @@ The Account service allows you to authenticate and manage a user account. You can use the account service to update user information, retrieve the user sessions across different devices, and fetch the user security logs with his or her recent activity. -Register new user accounts with the [Create Account](#create), [Create Magic URL session](#createMagicURLSession), or [Create Phone session](#createPhoneSession) endpoint. You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. +Register new user accounts with the [Create Account](/docs/references/cloud/client-web/account#create), [Create Magic URL session](/docs/references/cloud/client-web/account#createMagicURLSession), or [Create Phone session](/docs/references/cloud/client-web/account#createPhoneSession) endpoint. You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. -This service also exposes an endpoint to save and read the [user preferences](#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user's preferred locale, timezone, or custom app theme. +This service also exposes an endpoint to save and read the [user preferences](/docs/references/cloud/client-web/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user's preferred locale, timezone, or custom app theme.