Skip to content

Commit

Permalink
Merge pull request #5 from oriverk/feat/#3-add-posts
Browse files Browse the repository at this point in the history
Feat/#3 add posts
  • Loading branch information
oriverk authored Mar 23, 2024
2 parents 09c6493 + a8263c2 commit d8e16e6
Show file tree
Hide file tree
Showing 74 changed files with 28,094 additions and 5,941 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pnpm-debug.log*
.env
.env.production

.cache

# macOS-specific files
.DS_Store

Expand Down
15 changes: 15 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"default": true,
"first-line-h1": false,
"no-emphasis-as-heading": false,
"line-length": false,
// for GFM Alerts > [!NOTE]
"no-blanks-blockquote": false,
"no-inline-html": {
"allowed_elements": [
"details",
"summary",
"code"
]
}
}
54 changes: 54 additions & 0 deletions .textlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const IS_LINK_CHECK = !!process.env.LINK_CHECK;

module.exports = {
plugins: {
"@textlint/markdown": true,
latex2e: true,
},
filters: {
allowlist: {
allow: [
// markdown link and img alt
"/\\[.+?\\]/gm",
// math
"/\\$\\$?[\\s\\S]*?\\$\\$?/m",
"/\\$([^$]*)\\$/",
// url
"/<https?://.*?>/gm",
// aws
"/-?config/gm",
],
},
},
rules: {
"ja-no-inappropriate-words": true,
"ja-no-abusage": true,

"preset-ja-spacing": {
"ja-space-between-half-and-full-width": {
space: ["alphabets"],
},
"ja-space-around-code": { after: true, before: true },
"ja-space-around-link": { after: true, before: true },
},
"preset-ja-technical-writing": {
"no-doubled-joshi": false,
"no-exclamation-question-mark": false,
"ja-no-mixed-period": false,
"ja-no-weak-phrase": false,
"max-comma": false,
"max-kanji-continuous-len": {
max: 6,
allow: ["永続性記憶資源", "浮動小数点演算", "自己代入演算子"],
},
},
"period-in-list-item": {
periodMark: "",
},
"@proofdict/proofdict": {
dictURL: "https://azu.github.io/proof-dictionary/",
},
"aws-service-name": true,
"no-kangxi-radicals": true,
},
};
54 changes: 41 additions & 13 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
// https://www.kevinzunigacuellar.com/blog/google-analytics-in-astro/
import { defineConfig } from 'astro/config';
import svelte from "@astrojs/svelte";
import mdx from "@astrojs/mdx";
import partytown from "@astrojs/partytown";
import remarkComment from 'remark-comment';
import { rehypeAnchor, rehypeFigure } from './src/utils/markdown';
import svelte from "@astrojs/svelte";
import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
import expressiveCode from "astro-expressive-code";
import { defineConfig } from "astro/config";
import rehypeKatex from "rehype-katex";
import remarkComment from "remark-comment";
import remarkGithubAlerts from "remark-github-alerts";
import remarkMath from "remark-math";
import {
rehypeAnchor,
rehypeFigure,
remarkFencedCodeBlock,
} from "./src/utils/markdown";

// https://astro.build/config
export default defineConfig({
publicDir: "./public",
integrations: [
svelte(),
partytown({
config: {
forward: ["datalayer.push"]
}
})
forward: ["datalayer.push"],
},
}),
svelte(),
// NOTE: expressiveCode must be before mdx
expressiveCode({
themes: ["github-dark"],
plugins: [pluginLineNumbers()],
defaultProps: {
wrap: false,
},
frames: {
showCopyToClipboardButton: true,
removeCommentsWhenCopyingTerminalFrames: true,
},
}),
mdx(),
],
markdown: {
remarkPlugins: [remarkComment],
rehypePlugins: [rehypeAnchor, rehypeFigure]
}
});
remarkPlugins: [
remarkComment,
remarkMath,
remarkFencedCodeBlock,
remarkGithubAlerts,
],
rehypePlugins: [rehypeAnchor, rehypeFigure, rehypeKatex],
gfm: true,
},
});
10 changes: 10 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
}
},
"overrides": [
{
"include": [
"*.jsonc"
],
"json": {
"parser": {
"allowComments": true
}
}
},
{
"include": [
"*.svelte"
Expand Down
Loading

0 comments on commit d8e16e6

Please sign in to comment.