generated from onwidget/astrowind
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from cniajp/add/pek2024-session-watch-page
視聴ページを追加
- Loading branch information
Showing
7 changed files
with
485 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,47 @@ | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
import { defineConfig } from 'astro/config'; | ||
|
||
import tailwind from '@astrojs/tailwind'; | ||
import sitemap from '@astrojs/sitemap'; | ||
import mdx from '@astrojs/mdx'; | ||
import partytown from '@astrojs/partytown'; | ||
import { readingTimeRemarkPlugin } from './src/utils/frontmatter.mjs'; | ||
import icon from "astro-icon"; | ||
import {subDirSitemap} from "./src/integrations/sub-dir-sitemap"; | ||
|
||
import { subDirSitemap } from "./src/integrations/sub-dir-sitemap"; | ||
import { SITE } from './src/config.mjs'; | ||
|
||
import react from "@astrojs/react"; | ||
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
const whenExternalScripts = (items = []) => SITE.googleAnalyticsId ? Array.isArray(items) ? items.map(item => item()) : [items()] : []; | ||
|
||
const whenExternalScripts = (items = []) => | ||
SITE.googleAnalyticsId ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : []; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: SITE.origin, | ||
base: SITE.basePathname, | ||
trailingSlash: SITE.trailingSlash ? 'always' : 'never', | ||
|
||
output: 'static', | ||
|
||
markdown: { | ||
remarkPlugins: [readingTimeRemarkPlugin], | ||
remarkPlugins: [readingTimeRemarkPlugin] | ||
}, | ||
|
||
integrations: [ | ||
tailwind({ | ||
config: { | ||
applyBaseStyles: false, | ||
}, | ||
}), | ||
sitemap({ | ||
// pek2024 は別ディレクトリに出力するため除外 | ||
filter: (page) => !page.startsWith(SITE.origin + '/pek2024') | ||
}), | ||
subDirSitemap({outputDir: "pek2024", basePath: "pek2024"}), | ||
mdx(), | ||
|
||
...whenExternalScripts(() => | ||
partytown({ | ||
config: { forward: ['dataLayer.push'] }, | ||
}) | ||
), | ||
icon(), | ||
], | ||
|
||
integrations: [tailwind({ | ||
config: { | ||
applyBaseStyles: false | ||
} | ||
}), sitemap({ | ||
// pek2024 は別ディレクトリに出力するため除外 | ||
filter: page => !page.startsWith(SITE.origin + '/pek2024') | ||
}), subDirSitemap({ | ||
outputDir: "pek2024", | ||
basePath: "pek2024" | ||
}), mdx(), ...whenExternalScripts(() => partytown({ | ||
config: { | ||
forward: ['dataLayer.push'] | ||
} | ||
})), icon(), react()], | ||
vite: { | ||
resolve: { | ||
alias: { | ||
'~': path.resolve(__dirname, './src'), | ||
}, | ||
}, | ||
}, | ||
}); | ||
'~': path.resolve(__dirname, './src') | ||
} | ||
} | ||
} | ||
}); |
Oops, something went wrong.