diff --git a/public/assets/icons/external-link.svg b/public/assets/icons/external-link.svg
new file mode 100644
index 000000000..1925aa8fb
--- /dev/null
+++ b/public/assets/icons/external-link.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/public/default-og-image.png b/public/default-og-image.png
index 97903207e..d02739839 100644
Binary files a/public/default-og-image.png and b/public/default-og-image.png differ
diff --git a/public/favicon.ico b/public/favicon.ico
index a7280938e..af291920d 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/src/components/LeftSidebar/LeftSidebar.astro b/src/components/LeftSidebar/LeftSidebar.astro
index cd7ad728b..685390f9f 100644
--- a/src/components/LeftSidebar/LeftSidebar.astro
+++ b/src/components/LeftSidebar/LeftSidebar.astro
@@ -9,6 +9,7 @@ const { currentPage, content } = Astro.props as Props
// SIDEBAR is a flat array. Group it by sections to properly render.
const sidebarSections = !!SIDEBAR[content?.section] ? SIDEBAR[content?.section] : []
+const isExternal = (path: string) => /^(https?:|mailto:|tel:)/.test(path)
const removeSlashes = function (url: string) {
let sanitizedUrl = url
@@ -52,10 +53,18 @@ const currentPageMatch = removeSlashes(currentPage.slice(1))
<>
{child.title}
+ {isExternal(child.url) && (
+
+ )}
{!!child.children && (
@@ -63,10 +72,20 @@ const currentPageMatch = removeSlashes(currentPage.slice(1))
{child.children.map((childItem) => (
{childItem.title}
+ {isExternal(childItem.url) && (
+
+ )}
))}
diff --git a/src/components/PageContent/Feedback.tsx b/src/components/PageContent/Feedback.tsx
index 3637070f5..88c56ba17 100644
--- a/src/components/PageContent/Feedback.tsx
+++ b/src/components/PageContent/Feedback.tsx
@@ -17,6 +17,10 @@ const starOutline = (
/>
)
+
+const appId = "hvIeDclG2pt2nzAdbKWM0qms-MdYXbMMI"
+const appKey = "lKObgvpdxLT2JK839oxSM4Fn"
+
export const Feedback = () => {
const [rating, setRating] = useState(undefined)
const [isSent, setIsSent] = useState(false)
@@ -29,7 +33,7 @@ export const Feedback = () => {
}
setRating(selectedNumber + 1)
setIsSent(false)
- const path = "https://docs2-cl-default-rtdb.firebaseio.com/allratings.json"
+ const path = "https://leancloud.scroll.io/1.1/classes/Feedback"
const data = {
rating: selectedNumber,
time: Date.now(),
@@ -40,6 +44,8 @@ export const Feedback = () => {
headers: {
Accept: "application/json",
"Content-Type": "application/json",
+ "X-LC-Id": appId,
+ "X-LC-Key": appKey,
},
body: JSON.stringify(data),
})
@@ -55,13 +61,15 @@ export const Feedback = () => {
url: window.location.href,
}
- const path = "https://docs2-cl-default-rtdb.firebaseio.com/feedback.json"
+ const path = "https://leancloud.scroll.io/1.1/classes/Feedback"
setIsSubmitting(true)
fetch(path, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
+ "X-LC-Id": appId,
+ "X-LC-Key": appKey,
},
body: JSON.stringify(data),
})
diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts
index 4dd18a7f3..b003122de 100644
--- a/src/config/sidebar.ts
+++ b/src/config/sidebar.ts
@@ -13,7 +13,7 @@ export const SIDEBAR = {
{
section: "Pre-Alpha Testnet",
contents: [
- { title: "Introduction", url: "/" },
+ { title: "Introduction", url: "https://l2scan.scroll.io/" },
{
title: "User Guide",
url: "user-guide/",
@@ -24,7 +24,8 @@ export const SIDEBAR = {
},
{
title: "Faucet",
- url: "user-guide/faucet",
+ // url: "user-guide/faucet",
+ url: "https://scroll.io/prealpha/faucet",
},
{
title: "Bridge",
diff --git a/src/config/site.ts b/src/config/site.ts
index 3f1e7bd3e..71cfaa99b 100644
--- a/src/config/site.ts
+++ b/src/config/site.ts
@@ -21,4 +21,4 @@ export const OPEN_GRAPH = {
export const GITHUB_EDIT_URL = `https://github.com/scroll-tech/scroll-documentation/tree/main/`
// Uncomment this to add an "Join our Community" button to every page of documentation.
-export const COMMUNITY_INVITE_URL = `https://discord.gg/s84eJSdFhn`
+export const COMMUNITY_INVITE_URL = `https://discord.gg/scroll`
diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro
index f54cf1c46..3df084f99 100644
--- a/src/layouts/MainLayout.astro
+++ b/src/layouts/MainLayout.astro
@@ -14,7 +14,7 @@ const { content = {}, frontmatter } = Astro.props
const headings = Astro.props?.headings || Astro.props?.content?.astro.headings
const currentPage = new URL(Astro.request.url).pathname
-const currentFile = `src/pages${currentPage.replace(/\/$/, "")}.${frontmatter?.isMdx ? "mdx" : "md"}`
+const currentFile = `src/pages${currentPage.replace(/\/$/, "")}.${frontmatter?.file.split(".").pop() || "md"}`
const githubEditUrl = CONFIG.GITHUB_EDIT_URL + currentFile
const formattedContentTitle = content.title
? `${content.title} | ${CONFIG.SITE.title}`
diff --git a/src/pages/research.mdx b/src/pages/research.mdx
index 40f7d557c..8f4aac105 100644
--- a/src/pages/research.mdx
+++ b/src/pages/research.mdx
@@ -2,6 +2,7 @@
layout: ../layouts/MainLayout.astro
section: research
title: "Research Landing Title"
+isMdx: true
---
Content for the Research landing page. for fancy stuff, see the infrastructure page.