diff --git a/src/components/BackButton.astro b/src/components/BackButton.astro
index b16e33e223..9cbbcb6185 100644
--- a/src/components/BackButton.astro
+++ b/src/components/BackButton.astro
@@ -12,7 +12,7 @@ import { SITE } from "@/config";
href="/"
class="focus-outline mt-8 mb-2 flex hover:text-foreground/75"
>
-
+
Go back
diff --git a/src/components/BackToTopButton.astro b/src/components/BackToTopButton.astro
index c2f7617df8..da2da17e92 100644
--- a/src/components/BackToTopButton.astro
+++ b/src/components/BackToTopButton.astro
@@ -6,8 +6,8 @@ import IconArrowNarrowUp from "@/assets/icons/IconArrowNarrowUp.svg";
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 4c06eaedea..fd6903527a 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -27,7 +27,7 @@ const isActive = (path: string) => {
Skip to content
@@ -47,7 +47,7 @@ const isActive = (path: string) => {
)
diff --git a/src/components/Tag.astro b/src/components/Tag.astro
index 8da8a8ee19..d952a1b8f0 100644
--- a/src/components/Tag.astro
+++ b/src/components/Tag.astro
@@ -20,15 +20,15 @@ const { tag, tagName, size = "sm" } = Astro.props;
href={`/tags/${tag}/`}
transition:name={tag}
class:list={[
- "relative pr-2 text-lg underline decoration-dashed group-hover:-top-0.5 group-hover:text-accent focus-visible:p-1",
+ "relative pe-2 text-lg underline decoration-dashed group-hover:-top-0.5 group-hover:text-accent focus-visible:p-1",
{ "text-sm": size === "sm" },
]}
>
{tagName}
diff --git a/src/config.ts b/src/config.ts
index d86b8a05b5..ac034cca1d 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -17,6 +17,7 @@ export const SITE = {
url: "https://github.com/satnaing/astro-paper/edit/main/",
},
dynamicOgImage: true,
+ dir: "ltr", // "rtl" | "auto"
lang: "en", // html lang code. Set this empty and default will be "en"
timezone: "Asia/Bangkok", // Default global timezone (IANA format) https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
} as const;
diff --git a/src/data/blog/how-to-configure-astropaper-theme.md b/src/data/blog/how-to-configure-astropaper-theme.md
index 50da1ddd9c..f7ada4ac32 100644
--- a/src/data/blog/how-to-configure-astropaper-theme.md
+++ b/src/data/blog/how-to-configure-astropaper-theme.md
@@ -43,6 +43,7 @@ export const SITE = {
url: "https://github.com/satnaing/astro-paper/edit/main/",
},
dynamicOgImage: true, // enable automatic dynamic og-image generation
+ dir: "ltr", // "rtl" | "auto"
lang: "en", // html lang code. Set this empty and default will be "en"
timezone: "Asia/Bangkok", // Default global timezone (IANA format) https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
} as const;
@@ -66,6 +67,7 @@ Here are SITE configuration options
| `showBackButton` | Determines whether to display the `Go back` button in each blog post. |
| `editPost` | This option allows users to suggest changes to a blog post by providing an edit link under blog post titles. This feature can be disabled by setting `SITE.editPost.enabled` to `false`. |
| `dynamicOgImage` | This option controls whether to [generate dynamic og-image](https://astro-paper.pages.dev/posts/dynamic-og-image-generation-in-astropaper-blog-posts/) if no `ogImage` is specified in the blog post frontmatter. If you have many blog posts, you might want to disable this feature. See the [trade-off](https://astro-paper.pages.dev/posts/dynamic-og-image-generation-in-astropaper-blog-posts/#trade-off) for more details. |
+| `dir` | Specifies the text direction of the entire blog. Used as [HTML dir attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/dir) in ``. Supported values: `ltr` \| `rtl` \| `auto` |
| `lang` | Used as HTML ISO Language code in ``. Default is `en`. |
| `timezone` | This option allows you to specify your timezone using the [IANA format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Setting this ensures consistent timestamps across your localhost and deployed site, eliminating time differences. |
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 084f71c280..2a3f1deec7 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -48,7 +48,11 @@ const structuredData = {
---
-
+
diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro
index 3b8f0c92db..6094abbc39 100644
--- a/src/layouts/PostDetails.astro
+++ b/src/layouts/PostDetails.astro
@@ -132,7 +132,7 @@ const nextPost =
href={getPath(prevPost.id, prevPost.filePath)}
class="flex w-full gap-1 hover:opacity-75"
>
-
+
Previous Post
{prevPost.title}
@@ -144,13 +144,13 @@ const nextPost =
nextPost && (
Next Post
{nextPost.title}
-
+
)
}
@@ -211,7 +211,7 @@ const nextPost =
heading.classList.add("group");
const link = document.createElement("a");
link.className =
- "heading-link ml-2 opacity-0 group-hover:opacity-100 focus:opacity-100";
+ "heading-link ms-2 opacity-0 group-hover:opacity-100 focus:opacity-100";
link.href = "#" + heading.id;
const span = document.createElement("span");
@@ -235,7 +235,7 @@ const nextPost =
const copyButton = document.createElement("button");
copyButton.className =
- "copy-code absolute right-3 -top-3 rounded bg-muted px-2 py-1 text-xs leading-4 text-foreground font-medium";
+ "copy-code absolute end-3 -top-3 rounded bg-muted px-2 py-1 text-xs leading-4 text-foreground font-medium";
copyButton.innerHTML = copyButtonLabel;
codeBlock.setAttribute("tabindex", "0");
codeBlock.appendChild(copyButton);
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 45fc8e0683..8f0ce93653 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -37,7 +37,7 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);
RSS Feed
@@ -61,7 +61,7 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);
// only display if at least one social link is enabled
SOCIALS.length > 0 && (
-
Social Links:
+
Social Links:
)
@@ -103,7 +103,7 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);
All Posts
-
+