feat: implement global and Asia-focused SEO & localization optimizations#119
Merged
ThisIs-Developer merged 1 commit intoMay 26, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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 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; |
| "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 on lines
+5904
to
+5908
| // ========================================================================== | ||
| // Aegis SEO agency Multilingual & Internationalization (i18n) engine | ||
| // ========================================================================== | ||
| const I18N_DICTS = { | ||
| en: { |
| 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 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 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}`; |
| </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> |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)?lang=),localStorage, and browser language preferences (navigator.language).<html lang="...">attributes to improve accessibility audit indexing.2. Technical SEO & Schema Markup (
index.html)WebApplication/SoftwareApplicationdefinitions).x-defaultand alternate hreflang canonical links.3. Search Engine Indexing Mappings (
robots.txt,sitemap.xml)robots.txtspecifying crawler instructions and sitemap paths.sitemap.xmldetailing cross-localized entry-point links to prevent translation indexation duplicate content penalties.4. CJK Typography & Readability (
styles.css)5. PWA Enablement & Desktop Port ASO (
manifest.json,sw.js,desktop-app/package.json)manifest.jsonsetting background colors, icons, standalone display configurations, and orientation scopes.sw.jsfor offline functionality.desktop-app/package.json.Verification Steps Completed
?lang=zh,?lang=ja, etc.) to verify translation dictionary resolution and DOM fallback rendering.