Astro Theme Pure

Back

Update Theme

Update astro theme pure to the latest version

Breaking Changes#

v4.0.0#

  • Move all components, types and utils that are reused to new npm packages astro-pure. Affected components are included in . Import method is also changed:

    import { Button } from '@/components/user'
    import { Button } from 'astro-pure/user'
    ts
  • New format config file src/site.config.ts. There will be zod schema to validate the config file, and use of config will be changed to:

    import { siteConfig } from '@/site-config'
    import config from '@/site-config'
    // Or if you want to use the config that is after processed or transformed
    import config from 'vertual:config'
    ts
  • Built-in astro config supported. package astro-pure will automatically config some integrations like @astrojs/tailwindcss, @astrojs/mdx, @astrojs/sitemap, also with some rehypePlugins and remarkPlugins.

  • Change search engine to pagefind, mainly because Astro v5 will not allow getting collection data directly from client (that is core working mode of Fuse.js search engine).

  • Change some BaseHead tags config to src/site.config.ts.

v3.1.4#

  • Move config siteConfig.content.typographyProse to integrationConfig.typography.class in src/site.config.ts.

  • Move advanced components to src/components/advanced. Affected components are included in Advanced Components. Import method is also changed:

    import LinkPreview from '@/components/LinkPreview.astro'
    import { LinkPreview } from 'astro-pure/advanced'
    
    <LinkPreview href='https://www.cloudflare.com/' />
    ts
  • Move Substats config to related page src/pages/about/index.astro.

  • Change Github Card component to GithubCard in src/components/advanced. See Advanced Components #Github Card for usage.

  • Move Links Logbook to src/site.config.ts. See Friend Links #Basic Configurations.

v3.1.3#

  • Move user components to src/components/user. Affected components are included in User Components. Import method is also changed:

    import Button from '@/components/Button'
    import { Button } from 'astro-pure/user'
    ts
  • Replace remark-github-blockquote-alert plugin to component Aside. Check User Components #Aside to know how to migrate.

v3.1.2 (pre-release)#

  • Move some configuration items like telegram, walineServelURL to new structure in src/site.config.ts.

v3.1.1#

  • Move the internal parts in the src/utils to src/plugins.
  • Modify the configuration file astro.config.ts to astro.config.mjs.
  • Update ESLint to latest version and migrate configuration file .eslintrc.js to eslint.config.mjs.
  • Modify the prettier.config.js to prettier.config.mjs.

v3.1.0 (pre-release)#

  • Change common content markdown formatter coverImage to heroImage. You need to modify all your markdown files to replace coverImage with heroImage.

v3.0.9#

A stable version.

Pending update…

Update Method#

Rebase#

If you create a new project using fork, you can just rebase the theme repository to the latest version.

Merge Manually#

As there’s not the same git history, you might need to merge the theme repository to your project manually.

A soluable way for Windows user is using tool WinMerge.

A filter list here may be helpful:

## This is a directory/file filter template for WinMerge
name: Astro Theme Pure
desc: Diff for Blog v.s. Astro Theme Pure

## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include

## Filters for filenames begin with f:
## Filters for directories begin with d:
## To exclude some of the files that match the f: pattern, specify f!:
## To exclude some of the folders that match the d: pattern, specify d!:
## (Inline comments begin with " ##" and extend to the end of the line)

## Basic front-end files
d: \\\.git$ ## git directory
d: \\node_modules$

## Astro cache
d: \\\.vercel
d: \\\.astro

### Astro theme pure ###
d: ^\\public\\favicon$
f: ^public\\links\.json$

d: ^\\scripts-web$

d: ^\\src\\assets\\projects$
f: ^src\\assets\\avatar\.png$
d: ^\\src\\icons$
d: ^\\src\\content\\post$
d: ^\\src\\pages\\docs$
f: ^src\\pages\\terms\\.*\.md$

### Theme Extentions ###
f: ^src\\assets\\not-by-ai-badge\.svg$
f: ^src\\assets\\styles\\fc\.css$
f: ^src\\components\\about\\Umami\.astro$

## Documents & project configs
f: ^bun\.lockb$
f: ^LICENSE$
f: ^README\.md$
f: ^README-zh-CN\.md$
f: \.code-workspace$
f: ^ignore\.md$
diff