Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Markdown Processing and Emoji Font Family Fallback #33

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: Submit a report to help improve our project. Please write in English.
title: "{ BUG } Provide a short title for your bug"
title: "[BUG] Provide a short title for your bug"
labels: ["bug"]
body:
- type: markdown
Expand Down Expand Up @@ -43,3 +43,14 @@ body:
description: Which operating system are you using (e.g., Windows 11/Linux Distro/Steam Deck)?
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Chrome (including Arc, Brave, Opera, Vivaldi)
- Microsoft Edge
- Firefox
- Safari
- Other (please specify)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature Request
description: Request a new feature.
title: "{ REQUEST} "
title: "[REQUEST] "
labels: ["enhancement"]
body:
- type: markdown
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2

- name: Cache dependencies and Next.js build
uses: actions/cache@v4
with:
node-version: 20.18.0
path: |
~/.bun/install/cache
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}-

- name: Install dependencies
run: bun install
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on: pull_request

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 20.18.0

- name: Install dependencies
run: bun install
Expand Down
3 changes: 2 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,8 @@
.article g-emoji {
display: inline-block;
min-width: 1ch;
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
sans-serif;
font-size: 1em;
font-style: normal !important;
font-weight: 400;
Expand Down
14 changes: 9 additions & 5 deletions components/blog/ArticleContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ export const ArticleContent = ({ article }: { article: Post }) => {
const [contentHtml, setContentHtml] = useState("");

useEffect(() => {
const processContent = async () => {
const processedContent = await remark().use(html).process(article.body);
setContentHtml(processedContent.toString());
};
if (typeof window !== "undefined") {
// Now we are sure the code runs only in the browser
const processContent = async () => {
const processedContent = await remark().use(html).process(article.body);
setContentHtml(processedContent.toString());
};

processContent();
processContent();
}
}, [article]);

return (
<div>
<article
Expand Down