Skip to content

Welcome to AstroPaper-S

Published

AstroPaper-S is a fork of satnaing/astro-paper v4.5.0, based on Astro.

GitHub repo

Main changes:

Most of the other features, such as light/dark mode, fuzzy search, sitemap generation, and more, remain largely unchanged.

Usage

For development:

pnpm install
pnpm run dev

To build static site:

pnpm run build

Config

src/config.ts

Also see How to configure AstroPaper theme | AstroPaper

Disqus

Please replace your shortname in src/components/Disqus.astro

(function () {
  // DON'T EDIT BELOW THIS LINE
  const d = document,
    s = d.createElement("script");
 
  // Please replace SHORTNAME
  s.src = `https://SHORTNAME.disqus.com/embed.js`;
  s.setAttribute("data-timestamp", String(+new Date()));
  (d.head || d.body).appendChild(s);
})();

Static i18n

Look at src/lang/lang.ts

Modify translations to add new language, and set the desired language using the USED_LANG constant

Markdown Frontmatter

PropertyDescRemark
authorAuthor of the postdefault = SITE.author
titleTitle of the postrequired*
subtitleSubtitle of the postoptional
descriptionDescription of the post. Used in post excerpt and site description of the postoptional, auto-generated if not given
datepublished datetime in ISO 8601 formatrequired*
updatedModified datetime in ISO 8601 formatoptional
featuredWhether or not display this post in featured section of home pagedefault = false
draftMark this post ‘unpublished’default = false
tagsRelated keywords for this post. Written in array YAML formatdefault = ["others"]
categoriesCategories for this post. Written in array YAML formatoptional
ogImageOG image of the post. Useful for social media sharing and SEOdefault = SITE.ogImage or generated OG image
tocEnable table of contents for this postdefault = true
commentsEnable comments for this postdefault = true
mathEnable KaTeX for this postdefault = false
canonicalURLCanonical URL (absolute), in case the article already exists on other sourcedefault = Astro.site + Astro.url.pathname
slugSlug for the post. This field is optional but CANNOT be an empty string ("")default = slugified file name

Also see Adding new posts in AstroPaper theme | AstroPaper and src/content/config.ts


Markdown Syntax