Skip to content

Commit 2ff12e8

Browse files
Add generic markdown content, unify markdown utils
1 parent c26dec1 commit 2ff12e8

23 files changed

+477
-481
lines changed

CHANGELOG.md

Lines changed: 0 additions & 170 deletions
This file was deleted.

TODO.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
## vNow - fixes/refactoring
22

3-
- Add info button on the lightbox
4-
- Standardize importing of markdown to fix that stray css module.
53
- Clean up codebase, removing AI stuff.
6-
- Replace extractMarkdownDescription with import step / LLM
74
- Streamline logo style/props logic
85
- Clean up sticky nav references
6+
- Refactor SEO and sitemap
7+
98
- Ensure the OGs aren't svg eg https://oktech.jp/_astro/cybozu-logo.Ch1fNYi9_1b9AFL.svg
10-
- Custom 404 page.
11-
- Fix osx chrome projector view.
12-
- Regenerate redirects, but disable on new site.
9+
- Add info button on the lightbox
10+
- Fix osx chrome projector view
11+
- Remove redirects
1312
- Remove map for online evnet
1413

1514
## vNext

astro.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import icon from "astro-icon";
66
import { defineConfig } from "astro/config";
77

88
import redirects from "./redirects.json";
9+
import { remarkDescription, remarkReadingTime } from "./src/utils/remarkPlugins";
910

1011
// Determine the site URL and base path
1112
const isVercel = !!process.env.VERCEL_PROJECT_PRODUCTION_URL;
@@ -63,6 +64,9 @@ export default defineConfig({
6364
},
6465
integrations: [react(), icon()],
6566
redirects,
67+
markdown: {
68+
remarkPlugins: [remarkReadingTime, remarkDescription],
69+
},
6670
experimental: {
6771
clientPrerender: true,
6872
contentIntellisense: true,

content/articles/test-article.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Test Article"
3+
description: "Some SEO Here"
4+
keywords: ["test article", "test", "article"]
5+
---
6+
7+
This is a test article.

content/code-of-conduct.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: "Code of Conduct"
3+
description: "SOme SEO Here"
4+
keywords: ["code of conduct", "community guidelines", "inclusivity", "safety", "respect", "diversity"]
5+
---
6+
17
The OKTech community is made up of a mixture of professionals and volunteers from all over the world, working on every aspect of the whole - including mentorship, teaching, and connecting people.
28

39
Diversity is one of our huge strengths, but it can also lead to communication issues and unhappiness. To that end, we have a few ground rules that we ask people to adhere to. This code applies to anyone interacting in community spaces equally, including organizing members.
@@ -42,7 +48,7 @@ Disagreements, both social and technical, happen all the time and the OKTech com
4248

4349
---
4450

45-
# Code of Conduct - Reporting Guide
51+
# Reporting Guide
4652

4753
If you believe someone is violating [the code of conduct](/coc) we ask that you report it to [the OKTech organizer](/about#organization) using the [oktechjp@proton.me](mailto:oktechjp@proton.me) email address.
4854

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"tw-to-css": "^0.0.12",
7070
"typescript": "^5.8.3",
7171
"yaml": "^2.8.0",
72-
"yet-another-react-lightbox": "^3.25.0"
72+
"yet-another-react-lightbox": "^3.25.0",
73+
"mdast-util-to-string": "^4.0.0",
74+
"reading-time": "^1.5.0",
75+
"unist-util-visit": "^5.0.0"
7376
}
7477
}

src/components/Common/EntryMarkdown.astro

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
interface Props {
3+
markdown: string;
4+
class?: string;
5+
}
6+
7+
const { markdown, class: className = "prose prose-lg max-w-none" } = Astro.props;
8+
9+
// Import all markdown files from content directory
10+
const markdownFiles = import.meta.glob("/content/**/*.md");
11+
12+
// Normalize the path to match the glob pattern
13+
const fullPath = `/content/${markdown}`;
14+
15+
if (!markdownFiles[fullPath]) {
16+
throw new Error(`Markdown file not found: ${fullPath}`);
17+
}
18+
19+
const module = (await markdownFiles[fullPath]()) as any;
20+
const { Content } = module;
21+
---
22+
23+
<div class={className}>
24+
<Content />
25+
</div>

src/constants.ts

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const SEO_DATA: Record<
8080
"/": {
8181
title: "Home",
8282
description:
83-
"Join the Osaka Kyoto Tech Meetup Group - A vibrant community for web developers, designers, and tech enthusiasts in the Kansai region. Monthly events, workshops, and networking opportunities.",
83+
"Join the OKTech Meetup Group - A vibrant community for web developers, designers, and tech enthusiasts in the Kansai region. Monthly events, workshops, and networking opportunities.",
8484
keywords: [
8585
"tech meetup",
8686
"osaka",
@@ -137,7 +137,7 @@ export const SEO_DATA: Record<
137137
"/about": {
138138
title: "About",
139139
description:
140-
"Learn about OKTech - Osaka Kyoto Tech Meetup Group. Our mission is to build a thriving tech community through monthly events, workshops, and networking opportunities in Japan's Kansai region.",
140+
"Learn about the OKTech Meetup Group. Our mission is to build a thriving tech community through monthly events, workshops, and networking opportunities in Japan's Kansai region.",
141141
keywords: [
142142
"about",
143143
"community",
@@ -149,38 +149,12 @@ export const SEO_DATA: Record<
149149
"volunteer",
150150
],
151151
},
152-
"/code-of-conduct": {
153-
title: "Code of Conduct",
154-
description:
155-
"Our community guidelines and code of conduct for creating a safe, inclusive, and welcoming environment for all members of the Osaka Kyoto Tech Meetup Group.",
156-
keywords: [
157-
"code of conduct",
158-
"community guidelines",
159-
"inclusivity",
160-
"safety",
161-
"respect",
162-
"diversity",
163-
],
164-
},
165152
"/sitemap": {
166153
title: "Sitemap",
167154
description:
168-
"Site navigation and structure for the Osaka Kyoto Tech Meetup Group website. Find all pages, events, and venues organized in one place.",
155+
"Site navigation and structure for the OKTech Meetup Group website. Find all pages, events, and venues organized in one place.",
169156
keywords: ["sitemap", "navigation", "site structure", "pages", "directory"],
170157
},
171-
// Non-HTML resources for sitemap display only (not for SEO meta tags)
172-
"/rss.xml": {
173-
title: "RSS Feed",
174-
description: "Subscribe to our RSS feed for the latest tech meetup events and updates.",
175-
},
176-
"/oktech-events.ics": {
177-
title: "ICS Calendar Feed",
178-
description: "Subscribe to our calendar feed to stay updated with upcoming tech events.",
179-
},
180-
"/sitemap.xml": {
181-
title: "XML Sitemap",
182-
description: "XML sitemap for search engines.",
183-
},
184158
};
185159

186160
export const SOCIALS = [

0 commit comments

Comments
 (0)