diff --git a/.env.example b/.env.example index 77ffbf9..43783a6 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,3 @@ -PUBLIC_ALGOLIA_INDEX_BLOG=\w+ -PUBLIC_ALGOLIA_APP_ID=\w+ -PUBLIC_ALGOLIA_SEARCH_KEY=\w+ SECRET_ALGOLIA_ADMIN_KEY=\w+ SECRET_GH_PAT=\w+ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be23ae3..08c2c72 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,15 +33,12 @@ jobs: env: MODE: production SECRET_GH_PAT: ${{ secrets.SECRET_GH_PAT }} - PUBLIC_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} - PUBLIC_ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }} - PUBLIC_ALGOLIA_INDEX_BLOG: ${{ secrets.ALGOLIA_INDEX_BLOG }} - name: deploy to Cloudflare Pages uses: cloudflare/pages-action@v1 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: astro-site + projectName: ${{ secrets.CL_PROJECT_NAME }} directory: dist # Optional: Enable this if you want to have GitHub Deployments triggered # gitHubToken: ${{ secrets.SECRET_GH_PAT }} diff --git a/site.config.ts b/site.config.ts index 0cc4b1c..deeed05 100644 --- a/site.config.ts +++ b/site.config.ts @@ -7,4 +7,9 @@ export default { docsGitHubRepositoryExpression: "HEAD:cv/index.md", zenn: 'oriverk', x: 'not_you_die', + algolia: { + appId: "WOHC62BVSP", + apiKey: "bae638093bc0fe3156732e769d096c41", + index: "rod_oriverkdev" + } } diff --git a/src/constants/feed.ts b/src/constants/feed.ts index fbe01e9..9ca34a7 100644 --- a/src/constants/feed.ts +++ b/src/constants/feed.ts @@ -1,11 +1,11 @@ import type { Source } from "../types/feed"; export const sources: Source[] = [ - { - id: "blog.oriverk", - url: "https://blog.oriverk.dev/feed.xml", - includeUrlRegex: "blog.oriverk.dev/entry/", - }, + // { + // id: "blog.oriverk", + // url: "https://blog.oriverk.dev/feed.xml", + // includeUrlRegex: "blog.oriverk.dev/entry/", + // }, { id: "zenn.dev", url: "https://zenn.dev/oriverk/feed", diff --git a/src/content/blog/20190513-learned-programming.md b/src/content/blog/20190513-learned-programming.md index 84a6170..cf4a2d2 100644 --- a/src/content/blog/20190513-learned-programming.md +++ b/src/content/blog/20190513-learned-programming.md @@ -4,6 +4,7 @@ update: '2019-12-12' title: 'プログラミングを2か月間、日本人エンジニアの下で学んできた' tags: [cebu] published: true +nonidex: true --- from [Qiita: プログラミングを2か月間、日本人エンジニアの下でマンツーマンで学んできた](https://qiita.com/OriverK/items/30d8941c7799c9aa6dfd) diff --git a/src/content/blog/20220125-renew-oriverkdev.md b/src/content/blog/20220125-renew-oriverkdev.md index 3a29e30..bc32716 100644 --- a/src/content/blog/20220125-renew-oriverkdev.md +++ b/src/content/blog/20220125-renew-oriverkdev.md @@ -9,7 +9,7 @@ published: true ## はじめに -過去の投稿:『[Next.js でポートフォリオサイトを作成した](https://blog.oriverk.dev/entry/2020/20200526-next-portfolio/)』で言及した Next.js + TypeScript の構成を作り替えました。 +過去の投稿:『[Next.js でポートフォリオサイトを作成した](/blog/20200526-next-portfolio/)』で言及した Next.js + TypeScript の構成を作り替えました。 ### 以前のサイト diff --git a/src/content/blog/20221205-next13-app.md b/src/content/blog/20221205-next13-app.md index 4324f84..8a7f457 100644 --- a/src/content/blog/20221205-next13-app.md +++ b/src/content/blog/20221205-next13-app.md @@ -23,7 +23,7 @@ Next.js beta docs にあるように `app/` はまだ production 環境下で使 - TypeScript - マークダウン処理:[hashicorp/next-mdx-remote](https://github.com/hashicorp/next-mdx-remote) - CSS: TailwindCSS - - [CSSライブラリを goober から TailwindCSS に移行した | blog.oriverk.dev](https://blog.oriverk.dev/entry/2022/20221116-next-ts-tailwind/) + - [CSSライブラリを goober から TailwindCSS に移行した | blog.oriverk.dev](/blog/2022/20221116-next-ts-tailwind/) - 検索:[Algolia/react-instantsearch/packages/react-instantsearch-hooks-web](https://github.com/algolia/react-instantsearch/tree/master/packages/react-instantsearch-hooks-web) ## 移行前の主なディレクトリ構成 diff --git a/src/content/blog/20230500-svelte-site.md b/src/content/blog/20230500-svelte-site.md index 4fdb7c4..9223bb8 100644 --- a/src/content/blog/20230500-svelte-site.md +++ b/src/content/blog/20230500-svelte-site.md @@ -91,7 +91,7 @@ import Card from '../components/Card.astro'; - Static Site である - GitHub の Pinned Repos と Contribution Calendar(GitHub 草)を表示できる -- [blog.oriverk.dev](https://blog.oriverk.dev) のコンテンツを取得表示できる +- blog.oriverk.dev のコンテンツを取得表示できる - Cloudflare Pages にデプロイし、サイトデータを自動で更新できる また、以前に [oriverk.dev](https://oriverk.dev) を React で作ったときの感じを踏襲したいとも考えていました。 diff --git a/src/env.d.ts b/src/env.d.ts index 511f5a9..523fe3e 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -3,11 +3,7 @@ interface ImportMetaEnv { readonly SECRET_GITHUB_PERSONAL_ACCESS_TOKEN: string; - readonly PUBLIC_GA_MEASUREMENT_ID: string; - readonly PUBLIC_ALGOLIA_APP_ID: string; - readonly PUBLIC_ALGOLIA_SEARCH_KEY: string; - readonly PUBLIC_ALGOLIA_INDEX_BLOG: string; readonly SECRET_ALGOLIA_ADMIN_KEY: string; } diff --git a/src/utils/algolia.ts b/src/utils/algolia.ts index 5cd95bf..8270a11 100644 --- a/src/utils/algolia.ts +++ b/src/utils/algolia.ts @@ -2,19 +2,16 @@ import type { AlgoliaBlog } from "@/types/algolia"; import type { SearchResponse } from "@algolia/client-search"; import type { SearchClient, SearchIndex } from "algoliasearch"; import algolia from "algoliasearch"; +import siteConfig from "site.config" -const { - PUBLIC_ALGOLIA_APP_ID, - PUBLIC_ALGOLIA_SEARCH_KEY, - PUBLIC_ALGOLIA_INDEX_BLOG, -} = import.meta.env; +const {appId, apiKey, index} = siteConfig.algolia; const searchClient: SearchClient = algolia( - PUBLIC_ALGOLIA_APP_ID, - PUBLIC_ALGOLIA_SEARCH_KEY, + appId, + apiKey, ); const searchIndex: SearchIndex = searchClient.initIndex( - PUBLIC_ALGOLIA_INDEX_BLOG, + index, ); const emptyResults: SearchResponse = {