Skip to content

Commit

Permalink
refactor(none): ✨ move unified plugins to under lib/unified
Browse files Browse the repository at this point in the history
Closes: #80
  • Loading branch information
brklntmhwk committed Oct 21, 2024
1 parent 206dbdf commit 8021eaf
Show file tree
Hide file tree
Showing 39 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ import remarkMath from 'remark-math';
import { iconNameTypes } from './src/lib/astro-integrations/icon-name-type';
import { pagefind } from './src/lib/astro-integrations/pagefind';
import { SITE_URL } from './src/lib/consts';
import rehypeImageFigure from './src/plugins/rehype-image-figure';
import rehypePagefindIgnore from './src/plugins/rehype-pagefind-ignore';
import remarkAstroImageAssets from './src/plugins/remark-astro-image-assets';
import remarkCallout from './src/plugins/remark-callout';
import rehypeImageFigure from './src/lib/unified/plugins/rehype-image-figure';
import rehypePagefindIgnore from './src/lib/unified/plugins/rehype-pagefind-ignore';
import remarkAstroImageAssets from './src/lib/unified/plugins/remark-astro-image-assets';
import remarkCallout from './src/lib/unified/plugins/remark-callout';
import remarkEmbed, {
type RemarkEmbedOptions,
} from './src/plugins/remark-embed';
import remarkFootnote from './src/plugins/remark-footnote';
import remarkLineBreaks from './src/plugins/remark-line-breaks';
import remarkLinkCard from './src/plugins/remark-link-card';
} from './src/lib/unified/plugins/remark-embed';
import remarkFootnote from './src/lib/unified/plugins/remark-footnote';
import remarkLineBreaks from './src/lib/unified/plugins/remark-line-breaks';
import remarkLinkCard from './src/lib/unified/plugins/remark-link-card';
import {
canvaTransformer,
googleSlidesTransformer,
oEmbedTransformer,
youTubeTransformer,
} from './src/plugins/transformers';
import remarkCard from './src/plugins/remark-card';
} from './src/lib/unified/transformers';
import remarkCard from './src/lib/unified/plugins/remark-card';

// https://astro.build/config
export default defineConfig({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/layouts/BlogLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'katex/dist/katex.min.css';
import type { CollectionEntry } from 'astro:content';
import { getEntry } from 'astro:content';
import { Article } from '@/components/models/Article';
import { BuyMeACoffee } from '@/components/models/BuyMeACoffee';
import { BuyMeACoffee } from '@/components/ui/BuyMeACoffee';
import { FormattedDate } from '@/components/models/FormattedDate';
import { Likes } from '@/components/models/Likes/Likes';
import { Likes } from '@/components/ui/Likes/Likes';
import { Taxonomy } from '@/components/models/Taxonomy';
import { Toc } from '@/components/models/Toc';
import { Icon } from '@/components/ui/Icon';
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/NewsLayout.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type { CollectionEntry } from 'astro:content';
import { Article } from '@/components/models/Article';
import { BuyMeACoffee } from '@/components/models/BuyMeACoffee';
import { BuyMeACoffee } from '@/components/ui/BuyMeACoffee';
import { FormattedDate } from '@/components/models/FormattedDate';
import { Icon } from '@/components/ui/Icon';
import BaseLayout from '@/layouts/BaseLayout.astro';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { RemarkPlugin } from '@astrojs/markdown-remark';
import type { BlockContent, DefinitionContent, Paragraph, Root } from 'mdast';
import type { Plugin } from 'unified';
import { visit } from 'unist-util-visit';
import { isParagraph, isParent, isText } from './mdast-is';
import { isParagraph, isParent, isText } from '../mdast-is';

type Callout = {
type: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { RemarkPlugin } from '@astrojs/markdown-remark';
import type { BlockContent, DefinitionContent, Image, Link, Root } from 'mdast';
import type { Plugin } from 'unified';
import { visit } from 'unist-util-visit';
import { isLink, isList, isParagraph, isParent, isText } from './mdast-is';
import { isLink, isList, isParagraph, isParent, isText } from '../mdast-is';

const parseSign = (sign: string | undefined): string | undefined => {
if (sign === undefined || sign === '') return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { RemarkPlugin } from '@astrojs/markdown-remark';
import type { Parent, Root } from 'mdast';
import type { Plugin } from 'unified';
import { visit } from 'unist-util-visit';
import { isBareLink, isParent } from './mdast-is';
import { type Transformer, getHName, getHProperties } from './transformers';
import { isBareLink, isParent } from '../mdast-is';
import { type Transformer, getHName, getHProperties } from '../transformers';

export type RemarkEmbedOptions = {
transformers: Transformer[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
isFootnoteDefinition,
isFootnoteReference,
isTextOrInlineCode,
} from './mdast-is';
} from '../mdast-is';

const remarkFootnote: Plugin<[], Root> = (): ReturnType<RemarkPlugin> => {
return (tree) => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { RemarkPlugin } from '@astrojs/markdown-remark';
import type { Parent, Root } from 'mdast';
import type { Plugin } from 'unified';
import { visit } from 'unist-util-visit';
import { isBareLink, isParent } from './mdast-is';
import { isBareLink, isParent } from '../mdast-is';

const remarkLinkCard: Plugin<[], Root> = (): ReturnType<RemarkPlugin> => {
return (tree) => {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/[locale]/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getEntry } from 'astro:content';
import { BlogList } from '@/components/models/BlogList';
import { BulletinBoard } from '@/components/models/BulletinBoard';
import { BulletinBoard } from '@/components/ui/BulletinBoard';
import { PhotoGallery } from '@/components/models/PhotoGallery';
import { Icon } from '@/components/ui/Icon';
import BaseLayout from '@/layouts/BaseLayout.astro';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getEntry } from 'astro:content';
import { BlogList } from '@/components/models/BlogList';
import { BulletinBoard } from '@/components/models/BulletinBoard';
import { BulletinBoard } from '@/components/ui/BulletinBoard';
import { PhotoGallery } from '@/components/models/PhotoGallery';
import { Icon } from '@/components/ui/Icon';
import BaseLayout from '@/layouts/BaseLayout.astro';
Expand Down

0 comments on commit 8021eaf

Please sign in to comment.