Skip to content

feat: implement global and Asia-focused SEO & localization optimizations#119

Merged
ThisIs-Developer merged 1 commit into
mainfrom
feature/seo-and-localization-optimizations
May 26, 2026
Merged

feat: implement global and Asia-focused SEO & localization optimizations#119
ThisIs-Developer merged 1 commit into
mainfrom
feature/seo-and-localization-optimizations

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

Summary of Changes

This pull request implements comprehensive technical SEO, Progressive Web App (PWA) enablement, internationalization (i18n), and CJK typographic optimizations for Markdown Viewer (Web & Desktop).

1. Dynamic Multilingual Translation Engine (script.js, index.html)

  • Added client-side dictionary translations for English, Simplified Chinese (简体中文), Japanese (日本語), and Korean (한국어).
  • Integrated automatic detection prioritizing URL parameters (?lang=), localStorage, and browser language preferences (navigator.language).
  • Configured dynamic language dropdown menus in the desktop header toolbar and the mobile menu panel.
  • Automatically updates <html lang="..."> attributes to improve accessibility audit indexing.

2. Technical SEO & Schema Markup (index.html)

  • Injected Google-recommended JSON-LD schema structured data (WebApplication / SoftwareApplication definitions).
  • Added x-default and alternate hreflang canonical links.
  • Set up site-verification metadata placeholders for Baidu and Naver crawlers.

3. Search Engine Indexing Mappings (robots.txt, sitemap.xml)

  • Created robots.txt specifying crawler instructions and sitemap paths.
  • Created sitemap.xml detailing cross-localized entry-point links to prevent translation indexation duplicate content penalties.

4. CJK Typography & Readability (styles.css)

  • Prepended fast-loading, native CJK system font-stacks (PingFang SC, Hiragino Sans GB, Meiryo, Malgun Gothic, Apple SD Gothic Neo).
  • Optimized line-height spacing (1.75) and word-breaking configurations for regional readability.
  • Added smooth scale transition animations for dropdown menus.

5. PWA Enablement & Desktop Port ASO (manifest.json, sw.js, desktop-app/package.json)

  • Created manifest.json setting background colors, icons, standalone display configurations, and orientation scopes.
  • Cached the PWA manifest in sw.js for offline functionality.
  • Enhanced package registry metadata descriptions in desktop-app/package.json.

Verification Steps Completed

  1. Verified JSON-LD schema syntax for WebApplication snippet structure.
  2. Emulated query parameters (?lang=zh, ?lang=ja, etc.) to verify translation dictionary resolution and DOM fallback rendering.
  3. Inspected regional fallbacks on CJK layout rendering.
  4. Validated robots and sitemap path links.

Copilot AI review requested due to automatic review settings May 26, 2026 18:25
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment May 26, 2026 6:25pm

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multilingual UI support (EN/zh/ja/ko), Asia-focused SEO metadata (canonical/hreflang + JSON-LD), and PWA assets (manifest + SW caching) to the Markdown Viewer web app, plus a desktop package metadata update.

Changes:

  • Added client-side i18n dictionaries and language switching UI + runtime language detection.
  • Added SEO crawler signals (canonical/hreflang, JSON-LD schema) and new robots.txt/sitemap.xml.
  • Added PWA manifest and cached it in the service worker for offline support.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sw.js Adds manifest.json to the SW pre-cache list.
styles.css Adds CJK font stack + language dropdown styling + CJK typography rules.
sitemap.xml Introduces a localized sitemap entry with alternate hreflang links.
script.js Implements an i18n engine (dictionaries, detection, UI updates, URL param updates).
robots.txt Introduces crawler directives and points to the sitemap URL.
manifest.json Adds PWA manifest (start URL, colors, icon definition).
index.html Adds canonical/hreflang, verification meta placeholders, manifest link, JSON-LD, and new language UI + translatable stat labels.
desktop-app/package.json Updates desktop app package description metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread styles.css
Comment on lines +2882 to +2886
html[lang="zh"] .markdown-body,
html[lang="ja"] .markdown-body,
html[lang="ko"] .markdown-body {
line-height: 1.75 !important;
letter-spacing: 0.03em;
Comment thread manifest.json
"name": "Markdown Viewer",
"short_name": "MD Viewer",
"description": "A premium client-side GitHub-style Markdown editor and live preview tool.",
"start_url": "./index.html?utm_source=pwa",
Comment thread script.js
Comment on lines +5904 to +5908
// ==========================================================================
// Aegis SEO agency Multilingual & Internationalization (i18n) engine
// ==========================================================================
const I18N_DICTS = {
en: {
Comment thread script.js
const tabResetBtn = document.getElementById('tab-reset-btn');
if (tabResetBtn) tabResetBtn.innerHTML = `<i class="bi bi-arrow-counterclockwise"></i> ${dict.reset}`;
const mTabResetBtn = document.getElementById('mobile-tab-reset-btn');
if (mTabResetBtn) mTabResetBtn.innerHTML = `<i class="bi bi-arrow-counterclockwise"></i> ${dict.reset} all files`;
Comment thread script.js
Comment on lines +6190 to +6191
const currentTheme = document.documentElement.getAttribute('data-theme') || 'light';
mThemeToggle.innerHTML = `<i class="bi bi-${currentTheme === 'dark' ? 'sun' : 'moon'} me-2"></i> ${currentTheme === 'dark' ? dict.lightMode : dict.darkMode}`;
Comment thread script.js
Comment on lines +6129 to +6132
if (copyButtonText) copyButtonText.textContent = dict.copy;
}
const mCopyBtn = document.getElementById('mobile-copy-markdown');
if (mCopyBtn) mCopyBtn.innerHTML = `<i class="bi bi-clipboard me-2"></i>${dict.copy}`;
Comment thread index.html
</button>
<div class="mobile-menu-item dropdown w-100 p-0 border-0">
<button class="mobile-menu-item w-100 text-start dropdown-toggle" type="button" id="mobileLanguageDropdown" data-bs-toggle="dropdown" aria-expanded="false" title="Switch Language">
<i class="bi bi-translate me-2"></i> Language: <span id="mobile-current-lang-label">English</span>
@ThisIs-Developer ThisIs-Developer merged commit efe5b99 into main May 26, 2026
7 checks passed
@ThisIs-Developer ThisIs-Developer deleted the feature/seo-and-localization-optimizations branch May 26, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants