Add isRTL utility function in utils/dom.ts and expose it via CoreService
and window.fixit. Use isRTL to flip task list tooltip placement from
'right' to 'left' in RTL layouts.
SCSS now depends on Dart Sass (external) instead of Hugo Extended's
built-in LibSass, so the hugo.IsExtended check is no longer needed.
Also switches warnf to warnidf for encryption/pagefind warnings to
prevent duplicate messages.
Add a lightweight disclaimer notice at the beginning of articles to
indicate content origin (AI-generated, repost, original, custom).
- Add params.disclaimer config with enable, type, content options
- Support 4 types: ai, repost, original, custom
- Add custom SVG icons for ai/repost/original types
- Add i18n translations for 20 languages
- Add shimmer animation effect with RTL and reduce-motion support
* feat(i18n): add RTL support and Arabic/Persian translations
- Add `dir` attribute to `<html>` via `.Site.Language.Direction`
- Convert physical CSS properties to logical properties across ~30 SCSS files
- Add `[dir="rtl"]` overrides for elements that need physical direction (code blocks, translate, icons)
- Add `logical-direction.html` template function for config value normalization
- Add RTL-aware deprecation warnings for old "left"/"right" config values
- Rename github corner, TOC position, reading progress config values from "left"/"right" to "start"/"end"
- Add Arabic (ar.toml) and Persian (fa.toml) i18n translation files
- Update multilingual documentation with RTL language configuration guide
* feat(shortcodes): add RTL support for tabs and refactor border-radius mixin
- Rename tabs placement values from "left"/"right" to "start"/"end" with deprecation warnings
- Convert all physical directional properties in tabs SCSS to logical properties
- Add RTL overrides for translate and box-shadow in tabs
- Add "start"/"end" support to border-radius mixin using CSS logical properties
- Refactor fixit-decryptor to use border-radius(start/end) mixin
* feat(assets): add RTL support for toc-dialog slide animation
The mobile toc-dialog always slid in from the right (100vw). In RTL
mode it should slide from the left (-100vw), matching the
border-inline-start/margin-inline-end anchoring.
* feat(assets): add RTL support for post-tag comma separator
* refactor(assets): extract RTL styles into dedicated _rtl.scss
* feat(assets): add RTL support for theme-switch and directional icons
* feat(i18n): add RTL support and improve i18n
- Add RTL typography corrections for Arabic-script languages (:lang(ar/fa/ur))
- Remove fa-list-ol from RTL flip list (numbers get mirrored)
- Add Urdu translation file (i18n/ur.toml)
- Rename noMoretTranslations to noTranslations and simplify all translations
- Update json-viewer-element from 1.0.4 to 1.0.6
- Add RTL test posts (index.en.md, index.ar.md)
- Fix layout partials for RTL support
See https://fixit.lruihao.cn/docs/content-management/introduction/#rtl-language-support
Use getenv "HUGO_PARAMS_MENU_DRAFT" to control draft menu item visibility,
replacing the deprecated .Site.BuildDrafts (Hugo v0.156.0). (#702)
Also refactors menu range loops to use `continue` for reduced nesting.
Extract theme tokens, shortcuts, blocklist, safelist, and icon configuration
from uno.config.ts into a reusable workspace package at packages/unocss-preset/.
- Create @hugo-fixit/unocss-preset with presetFixIt and createFixItConfig()
- Simplify uno.config.ts to use createFixItConfig() with content/cli overrides
- Move unocss, @iconify/json from root devDependencies to preset package
- Update README warning to point to v1 migration guide
- Update version compatibility check for v1.0.0
- Remove temporary v1 development warning
- Update fixit-encrypt repository link in encrypt package README
Convert all TypeScript `private` and `private readonly` declarations to
ES6 `#` syntax for true runtime privacy. TypeScript's `private` keyword
only provides compile-time checking but fields remain accessible in
compiled JavaScript.
Add `{{/* ... */}}` header comments to 25 partials that had no documentation,
enabling `pnpm gen:docs` to generate their reference docs. Also fix
base/head/index.html leading blank line that prevented parser matching.
Groups covered: base/, feed/, function/, home/, init/, plugin/, single/, store/, (root).
* feat(gen-docs): add documentation generation package with SassDoc and TypeDoc support
Add new `@hugo-fixit/gen-docs` package that parses Hugo config (hugo.toml) and generates
documentation. Includes SassDoc annotations for SCSS variables and mixins, TypeDoc config
for TypeScript source docs, and a `.sassdocrc` configuration file.
* docs(readme): add browsers support section
* feat(gen-docs): add Hugo partials docs generation and fix config empty sections
- Add partial-parser.ts: parses Hugo partial comment blocks (@param/@return/@example)
- Add partials.ts renderer: generates grouped Markdown with param tables
- Add `partials` subcommand with -t/-o options for template injection
- Fix config-parser: empty TOML sections (library.js/library.css) now retain descriptions
- Fix config-parser: correctly distinguish section-level vs key-level comments
- Update README with partials subcommand documentation
- Rename package from @hugo-fixit/post-encrypt to @hugo-fixit/encrypt
- Rename bin from post-encrypt to fixit-encrypt
- Update all i18n translations (16 files) to use npx @hugo-fixit/encrypt
- Update CI workflow, publish script, code comments, and docs
- Rewrite README with performance benchmarks and other implementations
The `hugoVersion.extended` field is deprecated since Hugo v0.153.0
and the version check was removed in v0.153.2. WebP encoding is now
supported in all Hugo editions, and LibSass has been replaced by Dart
Sass. Since the theme requires Hugo >= 0.161.0, this setting is no
longer needed.
Add proper type definitions for Hugo's `@params` virtual module, configure
tsconfig paths/typeRoots for resolution, and remove the @ts-expect-error
suppress in color-scheme.ts. Also fix nil input handling in camel-case-keys.
- Restructure SCSS pages directory and rename shared to content
- Ensure hr overflow visible for awesome-hr icon
- Restore position relative on .page for absolute children
The reward SCSS was under pages/posts/ so it only loaded on post pages.
Moving it to pages/shared/shortcodes/ makes it available on all page types
(e.g. community page).
- Change sw-toast default from `display: flex` to `display: none` with proper CSS discrete transition
- Add `display: flex` in `.visible` state and `allow-discrete` transition for display property
- Restore production-only guard for SW notification and webmanifest templates
- Fix PWA config enable to always be true when template is rendered
- Fix extra space in head/index.html conditional
- Capitalize first letter of all description comments
- Add trailing periods to comment sentences
- Replace `e.g.` with `Example:` for consistency
- Convert inline URLs to `See: [description](url)` format
- Move inline comments before config keys
- Add ` #` suffix to group separator comments
- Fix `available values` to standalone lines
- Wrap angle brackets in backticks for syntax examples
Use `with` block to guard against nil resource in icon.html, preventing
panic when `resources.Get` fails. Correct simple-icons names from
`tencentqq` to `qq` for QQ and QQ Group social links.
* refactor(assets)!: rewrite content encryption with AES-256-GCM and PBKDF2
- Remove legacy Base64 obfuscation layer (content-encryption.html)
- Replace <cipher-text> with <template> for inert content storage
- Single-layer AES-256-GCM encryption via post-build script
- PBKDF2 key derivation (100k iterations) for encryption
- PBKDF2-protected password verification (data-verify-salt)
- Depth-tracking parser for nested shortcode support
- Dev mode: plaintext content used directly without encryption
- Remove crypto-js and xxhash-wasm vendored dependencies
* feat(post-encrypt): prepare package for npm publishing
- Add bin entry, build script, and dist output for npx usage
- Replace @hugo-fixit/shared with standalone implementations
- Add CLI shebang for direct execution
- Add package README with usage documentation
- Remove FIXIT_ENCRYPT_INPUT env var (redundant with --input)
- Add encryption detection warning in assets.html
- Remove Post-build Encryption sections from READMEs
* chore: integrate post-encrypt into build pipeline and use consola
- Replace console with consola for post-encrypt logging
- Improve verification messages (no templates, count, etc.)
- Simplify build scripts: encrypt runs as part of main build
- Update encryption detection warning to use npx command
* feat(assets): add encryption dev warning admonition
- Add danger admonition in single.html for full-page encryption (dev mode only)
- Add encryption detection warning in assets.html console
- Improve post-encrypt verification messages with template count
* feat(assets): improve encryption i18n, cache security, and error handling
- Add encryptionWarning and encryptionCommand i18n keys for all 16 languages
- Store PBKDF2 verification hash in localStorage cache for better security
- Show decryption errors via flashTooltip instead of console only
- Add FixItDecryptor type definitions in global.ts
- Move encryption detection to init/detection-encryption.html with batched warning
- Remove redundant per-page warning from assets.html
* feat(assets): redesign fixit-decryptor UI with card layout
- Page-level: card form with lock icon header, password input with key icon, primary-colored unlock button, circular re-encrypt button
- Shortcode-level: connected input+button design (search bar style) with focus ring sync
- Remove loading spinner, use display:none/flex toggle via .initialized class
- Move lock icon styling to UnoCSS (text-primary text-xl)
- Initialize CellTooltip on re-encrypt button
- Fix JSDoc @param warnings in global.ts
* refactor(assets): unify TOC template and decryptor animations
- TOC always rendered in `<template data-toc>`, containers populated by initToc()
- Moved TOC scroll/resize handling from events.ts to toc.ts (syncTocLayout, syncTocActiveState)
- Removed EventsModule toc dependency, updated public-api.ts constructor
- Removed visibility:hidden from #toc-auto
- Decryptor: form always visible, @starting-style for fade-in on init
- Decryptor: content expand/collapse animation using height + opacity
- Removed encrypted-hidden from TOC elements in single.html
* refactor(assets): add target to fixit:decrypted event and simplify handlers
- Add { target: Element } payload to fixit:decrypted in event-bus.ts
- Remove $content closure from fixit-decryptor init(), use detail.target
- Update content.ts and toc.ts to use detail.target from event
* fix(assets): use eventBus for TOC scroll/resize listeners and eliminate redundant template parsing
- Replace raw window scroll/resize listeners in TocModule with eventBus
subscriptions (fixit:scroll/fixit:resize), reusing EventsModule's
throttle and debounce instead of duplicating un-throttled handlers.
- Refactor hasUnencryptedTemplate in post-encrypt to accept the already-
computed matches array, avoiding a redundant findEncryptionTemplates
call on the same HTML content.
- Remove crypto-js and xxhash-wasm from README credits.
* style(assets): soften decryptor button background and add form hover shadow
* build(workflow): add post-encrypt step to build script
* refactor(params)!: snake_case config + eliminate params.page + use .Param
BREAKING CHANGE: All params keys renamed from camelCase to snake_case,
[params.page] section eliminated (moved to [params] level), and users
must update their hugo.toml and front matter accordingly.
Key changes:
- All camelCase config keys → snake_case (e.g., defaultTheme → default_theme)
- [params.page] flat keys and sub-sections moved to [params] level
- Removed function/params.html (manual merge), replaced with Hugo .Param
- New function/param.html partial for page-level section params with
shorthand boolean support and site defaults merging
- New function/camel-case.html for string conversion
- snake2camel.html renamed to camel-case-keys.html
- New function/get-cover.html for cover image resolution
- Deprecation warnings in detection-deprecated.html for old config keys
- Front matter only params (subtitle, featured_image, password, repost,
weight, message) use .Params.xxx instead of .Param
- Page-level sections use param.html partial
- Simplified patch.html (siteTime only) and init/index.html
Refs: camel-case-keys.html#29 (planned v1.0 breaking change)
* refactor(params)!: move params.link to page-level, simplify link guard
- Move [params.link] and [params.link.guard] to page-level section
- link.html: .Page optional, use param.html when available for
page-level override, fall back to site config without .Page
- Remove $guardConfig variable, use $config.guard directly
- Remove unnecessary .Page from callers that don't need page override
- friends.html: use param.html for link guard instead of link_guard
* refactor(params)!: move image/codeblock/json_viewer/filetree to page-level
- Move [params.image], [params.codeblock], [params.json_viewer],
[params.filetree] to page-level sub-sections
- Templates use param.html for merged config (page override + site defaults)
- image.html: .Page optional, falls back to site config without .Page
- Add v1- prefix to all deprecation warnidf IDs
- Fix camelCase key access in image.html (blackList, cacheRemote)
- Fix Hugo-lowered camelCase keys in code-block-wrapper.html
- Add deprecation warnings for codeblock camelCase Markdown attributes
- Add deprecation warnings for file-tree camelCase Markdown attributes
- Update render-codeblock-toggle.html for snake_case attribute names
* style: standardize @param comment style across all HTML templates
- PascalCase types: {string} → {String}, {boolean} → {Boolean},
{int} → {Int}, {map} → {Map}, {array} → {Array}
- Add missing ` - ` separator between param name and description
- Remove extra alignment spaces between type and param name
* refactor(params)!: move params.mermaid to page-level, extract gen/ templates
- Move [params.mermaid] to page-level sub-sections
- Mermaid config injected into window.config (per-page override support)
- mermaid.ts reads config from window.config.mermaid instead of parameter
- Create _partials/gen/ directory for JS content generators
- Move mermaid-bootstrap.html from plugin/ to gen/
- Extract window.config JS generation into gen/config.html
- mermaid.html uses param.html for wrapper config
* refactor(params)!: consolidate link_to_* into params.post_link section
- Move link_to_markdown/source/edit/report/vscode into [params.post_link]
- Rename keys: markdown, source, edit, report (bool), editor (string)
- editor defaults to "vscode", supports "trae" etc. via protocol template
- footer.html uses .Param "post_link" for all link toggles
- Remove link_to_* from deprecated keys list
* fix: add fallback for deprecated camelCase attributes and expand deprecation warnings
- render-codeblock-file-tree.html: folderSlash attribute fallback
- render-codeblock-toggle.html: lineNosToggler/lineWrapToggler fallback + warnings
- code-block-wrapper.html: maxShownLines/wrapperClass fallback
- detection-deprecated.html: add nested key warnings for 13 sections
(header, breadcrumb, navigation, watermark, busuanzi, image, mermaid,
codeblock, filetree, math.katex, math.mathjax.options, post_summary, footer)
- detection-deprecated.html: add link_guard front matter deprecation warning
* fix(mermaid): fix rendering in hidden tab panels and neutral layer scheduling
- isRenderContextActive: check tab-panel visibility via getBoundingClientRect
instead of panel.hidden (tab-container uses slot-based hiding, not hidden attr)
- bindTabContainerChanged: render neutral layers when switching tabs so
print/fallback scenarios work correctly
- style.html: Content+Path now uses to-css.html for proper SCSS compilation
- script.html: Content+Path now uses js-build.html with Build/Minify/Fingerprint
- Both paths now update integrity hash for SRI support
- script.html: restructured fallback logic to match style.html pattern
Add type: dir items with baseDir: static/lib for fonts and images that
must be served as static files, so librarybot can keep them in sync on
version bumps.
- Use AlternativeOutputFormats to render all links including manifest
- Add rel field to manifest output format config
- Skip manifest link when PWA is disabled
- Remove hardcoded JSON feed link in favor of AlternativeOutputFormats
- Comment out unused mediaTypes section
* feat(assets): redesign search result UI with heading, tags, categories and collections
- Add heading/anchor display for anchorified search results (inline in title row)
- Add tags, categories, collections display in search result metadata row
- Extend SearchResult interface with optional heading, tags, categories, collections
- Pass metadata through all search engines (Fuse.js, Algolia, Pagefind)
- Add search-specific render hooks to eliminate replaceRE hacks:
- render-heading.search.json: clean heading output without class/span
- render-codeblock.search.json: code output without line numbers
- fixit-encryptor.search.json: skip encrypted content in search index
- Add data-pagefind-ignore="all" to fixit-encryptor for Pagefind exclusion
- Add data-pagefind-meta for tags, categories, collections in Pagefind
- Add data-pagefind-sort for title (alphabetical sorting)
- Extend PagefindConfig.sortBy to support "title" option
- Redesign search modal SCSS with flex layout for title/heading/date row
- Add .suggestion-meta row with icon-styled tags/categories/collections
* feat(layouts): add Bing Custom Search Engine support
- Implement Bing CSE adapter in search engine (redirect to results page)
- Add Bing CSE widget embed in search page template via JavaScript snippet
- Update CSE engine warning message to be provider-agnostic
- Add Bing icon (fa-microsoft) for Bing CSE results
- Add cx config field for Bing and mark as unverified
- Service worker: versioned cache name, navigation preload, stale-while-revalidate for images
- New PWAModule extracted from MiscModule with async registration and update detection
- SW update notification toast in Hugo template with i18n support (16 languages)
- Web app manifest template (site.webmanifest) generated from [params.app] config
- [params.app] keys migrated to snake_case: name, short_name, pwa, no_favicon, svg_favicon, mask_color, tile_color, theme_color
- enablePWA moved from [params] to [params.app].pwa
- theme_color no longer accepts single-value, only {light, dark} map
- EventBus: new fixit:sw-update event
- SCSS: new _sw-toast.scss widget for update notification
- Add custom.js.example alongside custom.ts.example
- Update examples to use window.fixit instead of importing from theme source
- Add "Build" true for custom.ts in assets pipeline so esbuild compiles it
- Make code_font_family configurable via [params.appearance] in hugo.toml
- Standardize SCSS header comments: // → ///, remove Chinese text
- Add documented examples in custom.scss: fonts, page width, admonitions, task lists
`wait` without arguments returns only the last process's exit status,
so a failure in the first background build was silently swallowed.
Capture PIDs and wait on each explicitly to ensure any failure blocks
the Vercel deployment.
* feat(assets): refactor SCSS variables with Hugo config via hugo:vars
Use Hugo's hugo:vars mechanism (v0.161.0+) to configure SCSS variables
via [params.appearance] in hugo.toml, replacing the override.scss file.
- Add [params.appearance] config section in hugo.toml
- Create scss-vars.html partial for SCSS default values
- Pass vars to toCSS via head/index.html
- Rewrite _variables.scss to use @use "hugo:vars" as h with !default
- Update all 20 consumer files from @use "override" to @use "variables"
- Delete override.scss
- Add admonition mixin in core/mixins/_admonition.scss
- Update deprecation detection to use fileExists
* refactor(assets): standardize module setup() and simplify main.ts init
- Add setup() method to all modules (menu, theme, search, enc, misc, events)
- Rename initMenu to setup, initMenuDesktop/initMenuMobile to initDesktop/initMobile
- Rename initSearch, initFixItDecryptor to setup
- Standardize setup() position at end of each module class and interface
- Simplify main.ts init sequence to uniform setup() calls
* refactor(assets): replace config.template.scss with hugo:vars/internal
- Delete config.template.scss and its ExecuteAsTemplate pipeline
- Pass internal config (base URL, logo, loading) via hugo:vars/internal namespace
- Move CSS custom properties to _root.scss using set-fi-vars mixin
- Simplify _variables.scss by removing config namespace dependency
- Update CLAUDE.md to reflect new SCSS architecture
* style(i18n): fix spacing in Korean translation strings
* fix(assets): resolve dead SCSS config keys and deduplicate defaults
- Wire up 5 config keys with v.$ references: menu-active-color,
tag-cloud-start, tag-cloud-end, tag-cloud-end-dark,
pagination-link-color-dark (were reading from SCSS vars, ignoring
hugo:vars overrides)
- Remove dead !default flags from all v.$ references (hugo:vars
always provides values, making !default unreachable)
- Compute derived defaults in scss-vars.html from base values instead
of hardcoding duplicates
- Extract admonition mixin set-fi-vars map to shared $vars variable
- Create core/banner.ts for styled console version message
- Replace example.com with real domains in link test content
- Update type definitions and core module
- Update CDN paths to dist/fuse.cjs in jsdelivr.yml and unpkg.yml
- Replace local assets/lib/fuse/fuse.min.js with fuse.js (from dist/fuse.cjs)
- Update librarybot.yml version to 7.4.2
- Update Hugo template fallback path to lib/fuse/fuse.js
close#778
- Update CDN paths to dist/lite/builds/browser.umd.js in jsdelivr.yml and unpkg.yml
- Replace local assets/lib/algoliasearch/algoliasearch-lite.umd.min.js with browser.umd.js
- Update librarybot.yml sync source to dist/lite/builds/browser.umd.js
- Update Hugo template fallback path to lib/algoliasearch/browser.umd.js
- Rewrite search.ts algolia integration to use window['algoliasearch/lite'].liteClient (v5 API, removes initIndex compat)
- Update window type declaration in ui.ts to match v5 UMD global
- Replace helpers dispatcher pattern with standalone chroma-lexers package
- Add runCommand, fromRoot, consola re-export to shared
- Update versioning and integration to use shared utilities
- Shorten dev version format: base36 timestamp, no hash
- Rename eslint.config.js to eslint.config.ts (add jiti)
- Add README.md to each package
- Add `packages/helpers` with CLI dispatcher pattern for code generation
- Add `chroma-lexers` helper that fetches lexer definitions from alecthomas/chroma
- Rename `$code-type-map` to `$chroma-lexers`, `_code-type.scss` to `_chroma-lexers.scss`
- Fix `fi-var` and `set-fi-var` to preserve quotes for string fallbacks
- Add `capitalize` utility to `packages/shared`
- Replace `console.*` with `consola` in packages
- Add `pnpm gen:lexers` script and CI workflow for auto-regeneration
- Update CLAUDE.md and CONTRIBUTING.md
- Replace legacy service-worker.js (imported from DoIt) with a clean
rewrite using Hugo's ExecuteAsTemplate for fingerprinted URL injection
- Cache-first for static assets (immutable/fingerprinted), network-first
for HTML pages with LRU eviction (max 100 entries)
- Fix LRU eviction to protect precached URLs using absolute URL comparison
- Add Fingerprint param to js-build.html partial to reduce boilerplate
- Extract to-css.html partial for reusable SCSS-to-CSS pipeline
- Support pre-built Resource param in script.html and style.html
- Store mainCSS and mainJS in Site.Store to avoid duplicate builds
- Remove explicit scope from serviceWorker.register() (defaults to /)
Closes#298
* feat(Artalk): add missing Artalk config options and remove deprecated useBackendConf
* fix(Twikoo): improve lang config with proper fallback mapping
* refactor(assets): unify comment system lang config with inline mapping
Replace i18n-based lang translation (valineLang, facebookLanguageCode)
with inline mapping for Valine, Facebook, and Twikoo.
Fixes: ja incorrectly mapped to zh-cn in Valine.
- Simplify `resources.Get` calls to string paths in script pipeline
callers (plugin/script.html handles resources.Get internally)
- Refactor js-build.html to use $defaultOptions merge pattern matching
style.html's ToCSS handling for better readability
- Refactor style.html ToCSS with $defaultOptions merge pattern and
automatic targetPath generation from resource name
- Remove redundant custom $options dicts for targetPath that match
the new default behavior
- Update partial docs for script.html and style.html
- Add optional `nextVersion` field in package.json to override the
auto-incremented patch version used for dev builds
- In prod mode, automatically remove `nextVersion` field after release
- Fix packages tsconfig.json: switch to `module/moduleResolution: nodenext`,
remove unsupported `baseUrl` and `jsx` options
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: add TypeScript support and refactor utility functions
* docs: add CLAUDE.md for Claude Code guidance
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* refactor(assets): replace factory-function pattern with service classes and DI container
Introduce typed service container, event bus, and service interfaces to replace
the shared FixItContext factory-function pattern. Each module is now a standalone
class implementing a typed interface, with explicit constructor-injected
dependencies. The window.fixit backward-compatibility facade is built via a
publicAPI() helper that extracts class methods.
Also removes unnecessary setTimeout/afterPaint deferred execution wrappers
from init sequences, and improves module header comments.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* refactor: replace private properties with class fields in modules
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* refactor(assets): rewrite link page script in TypeScript
Rename pages/link.js to link.ts with proper type annotations and update
the Hugo template reference accordingly.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: rewrite CLAUDE.md and copilot-instructions.md in English
Update both files to reflect the new service-class architecture with
DI container, typed event bus, and ES6 # private fields.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: update event handling to use CustomEvent for better type safety
* refactor: enhance theme switching by adding isChanged flag to event details
* refactor(assets): refactor Mermaid module structure and event wiring
* refactor(assets): align lib integrations with TypedEventBus and add module overviews
* chore(assets): remove vite-specific import ignore comments
* refactor(assets): remove deprecated forEach utility and use native forEach
Replace custom forEach wrapper with native .forEach() on NodeList, HTMLCollection (via querySelectorAll), and arrays. The utility was already marked @deprecated and all 30+ call sites use synchronous handlers, making the wrapper unnecessary. Also replace getElementsByClassName/getElementsByTagName with querySelectorAll for consistency.
- Delete utils/array.ts (no longer needed)
- Remove forEach export from utils/index.ts
- Refactor 11 module files to use native .forEach()
- Switch getElementsByClassName to querySelectorAll in theme.ts and charts.ts
* refactor(assets): split ChartsModule into independent lib files
Move ECharts, Mapbox GL, and TypeIt integrations from the ServiceContainer-managed ChartsModule into three standalone lib files (echarts.ts, mapbox.ts, typeit.ts). Each lib:
- Instantiates its own TypedEventBus
- Reads config from window.config.*
- Self-initializes on DOMContentLoaded
- Handles decrypt/re-init events independently
- Uses implicit idempotency via DOM element queries
Key improvements:
- Reduces ServiceContainer complexity
- Makes chart libs independently loadable
- Fixes partial decryption handling in echarts (only re-inits decrypted portion)
- Maintains consistency with aplayer/file-tree lib pattern
* refactor(assets): extract third-party libraries to standalone lib files
Extract twemoji, pangu, cookieconsent, watermark, lightgallery, and json-viewer
from modules into separate lib files for better separation of concerns. Each lib
is loaded conditionally via assets.html and handles its own initialization and
event lifecycle independently.
Additionally, unify fixit event handling by replacing document.addEventListener
calls with TypedEventBus.on() in EncryptionModule and MiscModule for consistent
event architecture.
Remove unused MiscService dependency from ContentModule.
* refactor(assets): unify js.Build pipeline and defaults
- extract shared helper partial function/js-build.html for js.Build + minify
- make plugin script renderer and Mermaid use the same js.Build logic
- default Build.minify to hugo.IsProduction when unset
- default Build.sourceMap to cond hugo.IsDevelopment "linked" "none"
- remove duplicated sourceMap branching in layout templates
- update js targetPath naming to .js (no explicit .min.js suffix)
* refactor(assets): extract comment systems to independent lib files
Extract comment system initialization logic from CommentModule into 7 independent
lib files (artalk, gitalk, valine, waline, utterances, twikoo, giscus). Each lib:
- Conditionally loads based on window.config.comment configuration
- Handles backend-specific initialization via DOMContentLoaded
- Manages its own theme synchronization and event listeners
- Is loaded conditionally in assets.html only when enabled
Simplify CommentModule to handle only:
- Comment section UI display and visibility toggle
- Shared lightGallery initialization utility (used by Artalk and Twikoo)
- Comment expiration handling
This reduces module complexity and enables per-backend lazy loading.
* refactor(assets): unify js.Build pipeline and consolidate PWA config
Enhance js-build.html to accept Build as bool/dict, auto-derive
targetPath from resource name (.ts → .js), and skip js.Build when
Build is false/omit. Simplify assets.html by removing explicit
targetPath dicts for all .ts lib builds. Consolidate enablePWA and
serviceWorkerURL into a PWA config object.
* refactor(assets): decouple toc from content module and add JSDoc headers
- Remove TocService dependency from ContentModule, toc now self-manages
- Rename initContent() → setup(), init() → setup() for toc
- Make initFootnotes private (#initFootnotes)
- Add multi-line JSDoc headers with Responsibilities to all modules,
main.ts, pages/link.ts, and head/color-scheme.ts
* refactor(assets): split types.ts into types/ directory module
* refactor(assets): simplify JS module architecture and expose typed window.fixit API
- Remove DI container (core/container.ts), use direct constructor calls
- Export shared eventBus singleton from core/event-bus.ts, remove 16 redundant instances
- Merge thin modules: SvgModule/CommentModule/LinkGuardModule into ContentModule/MiscModule
- Trim service interfaces to externally-used methods only
- Replace publicAPI() reflection with minimal typed window.fixit facade
- Expose public APIs: setThemeMode, eventBus, initContent, mask overlay, scroll state
- Extract setThemeMode from initSwitchTheme closure as public method
- Rename fixit:reset to fixit:re-encrypt, remove dead events
- Replace custom.js.example with custom.ts.example
- Update CLAUDE.md and copilot-instructions.md
* style(i18n): use semantic names for comment dividers instead of file paths
Replace file-path-based comment dividers (e.g. partials/base/header.html)
with semantic names (e.g. Header) across all 16 i18n files for consistency.
* chore(workflow): update cron schedule for library updates
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* fix(scss): remove top-level parent selector for Dart Sass compatibility
Dart Sass strictly disallows top-level parent selectors (`&`), which causes build failures on newer Hugo versions (e.g. 0.158.0+).
* feat(styles): refactor special styles for friends and search layouts
* fix(seo): restructure head partial, fix Twitter social and SEO improvements
- Split head template into dedicated partial hierarchy for better maintainability
- Add full Twitter Cards support with dynamic site and creator metadata
- Update social media link prefix from twitter.com to x.com and rename label to X
- Fix Twitter/X share button and Buffer via parameter handling
- Add Mastodon verification meta tags and rel="me" links
- Improve SEO structured data for both homepage and blog posts
- Add test site configuration and test avatar asset
---------
Co-authored-by: Cell <1024@lruihao.cn>
- Update Node.js version in .nvmrc from v20 to v24
- Update pnpm packageManager from 10.33.0 to 11.0.9
- Update pnpm-workspace.yaml to use allowBuilds instead of onlyBuiltDependencies
- Bump dev dependencies to latest versions: @antfu/eslint-config, @types/node, lint-staged, typescript
* BREAKING CHANGE: refactor with Dart Sass (supplement to #741)
* chore: update .gitignore to include .vercel and .env*.local
* CI: add build script for Hugo site deployment on Vercel
* CI: update build script for Hugo site deployment on Vercel
* refactor: update SCSS layout styles and introduce page-style mixin
* refactor: reorganize SCSS files and improve layout structure
* refactor: rename copy button classes and update related styles
* Dart Sass calc compatibility
* Fix: Default to Dart Sass transpiler + silence deprecations
* Fix: Add imagePreview config toggle — wrap the featured image block
* Implement featured image preview in summary.html
Added featured image preview functionality to summary layout.
* Add imagePreview parameter to home posts configuration
Added option to control featured image preview in home posts.
* Enable image preview in home page post list
- Added shellEmulator and trustPolicy configurations to pnpm-workspace.yaml to improve workspace behavior
- Fixed topic paths in the Hugo build scripts for the demo and test applications, replacing dynamic variables with relative paths
- Refactored update-version.ts, extracting regular expressions as constants to improve code readability and maintainability
* refactor(styles): unify theme properties and update color variables across stylesheets
* Implement theme mode support with light-dark color adjustments across stylesheets
- Added color-scheme support in _root.scss for light and dark modes.
- Replaced theme property mixins with light-dark function in various widget styles including _cell-tooltip.scss, _cookieconsent.scss, _fixed-button.scss, and others.
- Updated alert styles in _alert.scss to use light-dark for border and text colors.
- Refactored code syntax highlighting in _code.scss and _code-syntax/_index.scss to utilize light-dark for background gradients.
- Enhanced search input styles in _search.scss to adapt to theme mode.
- Modified theme switching logic in color-scheme.js and theme.js to support new theme mode structure.
- Adjusted APlayer and Valine styles to accommodate dark mode using new theme variables.
* feat(shortcode): add auto-dark shortcode for dark mode adaptation
* refactor(styles): update theme colors and improve box-shadow properties for better visual consistency
* feat(header): add scroll-state container queries and enhance header shadow effects
* feat(styles): enhance scroll behavior with overscroll-behavior adjustments for better UX
* feat(styles): update code&table styles and colors for improved visual consistency
* feat(styles): update color variables and improve font styling for better visual hierarchy
- Removed the old blur mixin based on filter: blur, and replaced it with backdrop-filter for a more modern frosted glass effect
- Added the `params.header.blur` configuration option, allowing users to enable/disable the header blur effect
- Refactored the masking interaction of the mobile menu and search, applying the blur class to the masking element instead of the body
- Updated the header animation class name to distinguish it from custom animations and avoid conflicts with Animate.css
- Adjusted responsive breakpoints, changing `xs` to `sm` to improve mobile display
- Optimized the header background color and the background color of the fixed buttons
* feat(markup): add toggle code block functionality with multiple format support
* fix(assets): improve filename generation for code downloads
* feat(code): add `before_tabs` attribute support for tabbed code blocks
* feat(code): implement visibility control for first tab content in code blocks
* feat(responsive): add responsive breakpoints and mixin for media queries
* refactor: print styles and add media query support
* refactor(responsive): enhance responsive styles across various components
* refactor: CSS variables to use fixit-var for consistency across styles
* refactor: reorganize CSS structure and consolidate imports for improved maintainability
* refactor: unify CSS variable usage and improve structure across stylesheets
* refactor: standardize CSS variable usage for layout
* refactor: standardize CSS variable usage for archive and special pages
* refactor: standardize CSS variable usage for single page
* refactor: standardize CSS variable usage for widgets
* refactor(css): refactors the border-radius mixin and adds the .rounded-full utility class
* refactor: standardize z-index usage across components
* refactor(css): removes deprecated compatibility mixins and replaces them with native CSS properties
* feat: unify color variable naming and update theme color values
- Rename `global-font-secondary-color` to `global-placeholder-color` for more accurate description of its purpose
- Update multiple style references to use the new `secondary` theme color variable
- Update theme color mapping to the new color values for improved visual consistency
- Fixed the use of search box placeholder colors and removed hard-coded transparency values
- Added color preview test documentation for easier verification of color rendering
- Cleaned up some duplicate dark mode styles and replaced them with unified CSS variables
* refactor: remove the `hr-background-color` variable and uses `global-border-color` uniformly
* feat(CSE): add dark theme style to Google CSE search box and results container
* fix(task-lists): fixed styling and rendering issues with nested task lists
* Fix deprecation warning with latest hugo version 0.156.0
* fix: use `hugo.Data` to replace the discarded `.Site.Data`
* chore(hugo): update Hugo version requirements to 0.156.0
---------
Co-authored-by: Cell <1024@lruihao.cn>
* feat(File Tree): add `file-tree` shortcode support
* feat(file-tree): add ignoreList parameter to file-tree shortcode
* feat(file-tree): enhance file-tree shortcode with ignoreList and folderSlash options
* feat(file-tree): enhance file-tree shortcode to support data mode
* feat(file-tree): enhance file-tree shortcode to support file mode
* feat(file-tree): improve content parsing in file-tree shortcode
* feat(file-tree): improve root path validation and error handling in filesystem mode
* test(file-tree): add unit tests for `file-tree` shortcode
* feat(file-tree): add file-tree code block rendering support
* refactor(file-tree): extract filesystem scanning to get-file-tree partial
Move directory traversal and root path validation to a separate partial function,
consolidating all filesystem-related logic in one place. This simplifies the
shortcode implementation and ensures a unified data format for rendering.
* docs(readme): extend code fence and shortcode support for file tree in documentation
* feat(file-tree): add fullRootName parameter for root path display in file tree
* feat(file-tree): add language parameter to get-file-tree function
* feat(file-tree): add highlightList parameter for file-tree shortcode
* perf(file-tree): add level param for get-file-tree function to descend only level directories deep
> The `Param` method on a `Page` object looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY `in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the Param method returns `nil`.
>
> See: https://gohugo.io/methods/page/param/
So `.Page.Param` is only suitable for simple types.
* feat: add blacklist option for image optimisation and enhance shortcode parameters
To ensure compatibility with Hugo 0.153.0, converting GIFs to WebP is prohibited. (gohugoio/hugo#14282)
* feat: enhance image plugin with Matches parameter for better resource handling and improve featured image rendering
* feat: optimize code highlighting for diff language
* refactor: update codeblock configuration and enhance code wrapper functionality
* fix: extra blank lines would appear when copying lines containing code highlighting
* refactor: enhance code block wrapper functionality and add new styles (mac style)
* refactor: enhance code block normal mode
* feat: do noting for code block simple mode
* feat: add copy btn for code block modes mac and simple
* refactor: add code-related variables and update styles for code blocks and gist layout
* feat: update code copy button visibility on hover for larger screens
* feat: update code block mode attribute and remove mac wrapper
* feat!: code block parameters accurate to a single
Remove the `data-open` attribute and use `.open` instead.
* refactor: enhance initCopyCode method to accept optional button parameter
* feat: improve code/diagram copy button styles and transitions for better visibility
* fix: disable copy buttons for simple/mac mode code blocks when copyable set to false
* chore: rename normal partial to code-header
* feat: add preview and expand feature for code blocks (close#312)
* fix: adjust transition timing for code header and fade-out animation
* test: update code block test case
* docs: update comments for code highlight and markup configurations
* feat: adjust code header background color darkening for light and dark themes
* fix: hide aside and breadcrumb pseudo-elements on small screens
* perf: change the code copy button and code expand button to server-side rendering
* fix: the code expand button obscured the code content
* fix: update code background and header colors for improved visibility
* fix: ensure code copy button is only added for copyable code blocks
* feat(code block): add lineNosToggler and lineWrapToggler params and feature for code blocks
* refactor: code syntax highlighting styles
* fix: update background color for line numbers and ensure proper sticky effect
* feat(code block): add support for code file names in code blocks
* fix: code review for PR #665
* feat(i18n): add Japanese and Korean translations; update toggle options in multiple languages
* docs: update configurations and comments
* feat: add toc drawer button
* feat: add TOC dialog functionality and related styles
* feat: change back-to-top button with scroll progress indicator
* feat: update color-scheme handling in theme switcher
* fix: code review for checking mistakes and optimization
* fix: the issue where the TOC was still clickable even when it was hidden.
* Initial plan
* Refactor duplicated code in theme.js
- Extract highlight text logic into _applyHighlightToText helper method
- Extract search UI reset logic into _resetSearchUI helper method
- Extract content initialization logic into _initContentComponents helper method
- Extract encrypted class toggling into _toggleEncryptedClass helper method
- Reduce code duplication in initSearch, initFixItDecryptor, and init methods
Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>
* Simplify _toggleEncryptedClass with boolean parameter
- Replace fromClass and toClass parameters with a single show boolean
- Hardcode class names 'encrypted-hidden' and 'decrypted-shown' in function body
- More semantic API: true to show decrypted content, false to hide
- Simplifies all 3 call sites with clearer intent
Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>
* refactor: remove redundant DOMContentLoaded checks in aplayer and mermaid initialization
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>
Co-authored-by: Cell <1024@lruihao.cn>
* docs: improve error message clarity for shortcode parent block validation
* feat: add APlayer shortcode and audio support
* feat: support both APlayer and MetingJS
* feat: initialize APlayer when content decrypted
* fix: correct URL handling in assets partial for language support
* feat: update JavaScript config paths for assets and post-chat integration
* fix: update favicon and manifest links to use relURL for correct path resolution
Refactored fuse search configuration logic to dynamically resolve fuseIndexURL based on current language context.
Replaced static .RelPermalink assignment with conditional logic that handles translated pages.
Introduced logic to determine config.js path based on whether the current page is a regular content page or a language root.
- For regular pages: config.js is placed under the page's permalink.
- For non-regular pages: config.js is resolved using the language prefix.
This ensures correct search index loading in multilingual Hugo sites.
* refactor: update config script handling to support dynamic target paths
* refactor: refactor the output paths of the script and style shortcodes, and add test cases
* fix: remove redundant console log in script-style-test.md and update MathJax and Mermaid plugin configurations in assets.html
* feat: add tabs and tab shortcodes support
Powered by https://github.com/github/tab-container-element
* fix: adjust tab-container styles for improved layout and responsiveness
- [x] Underline Style (Default)
- [x] Pill Style
- [x] Card Style
- [x] Segment Style
* test: add tabs comprehensive test cases
* style: code optimization
* fix: add tabs support in home scope
* docs: add `<tab-container>` element reference to README files
* feat: enhance tab-container with loading mixin and simplify code
* refactor: update variable references to use root prefix in styles
* docs: add tabs shortcode support to README files
* fix: ensure shortcode is enclosed within a tabs block
* feat: add responsive design for tab-container on smaller screens
* test: remove unnecessary placement attribute for segment tabs
* refactor: remove unused vertical attribute from tabs shortcode
* fix: set default tab type to 'underline' for consistency
* refactor: update tab-button and tab-panel selectors for improved specificity
* refactor: set watermark config in template, change the default content to author name or site title
* fix: case insensitive for mathjax options param
* chore: fix typo
* chore: use monorepo to manage demo, test and other applications and internal packages
* style: add eslint support and lint code
* chore: refactor project structure and add versioning package replace of fixit-releaser
* chore(deps-dev): replace husky with simple-git-hooks
* Potential fix for code scanning alert no. 13: Shell command built from environment values
* chore(deps-dev): update the final fixit-releaser version
* docs: update contributing guidelines for new structure and commands
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- Refactor issue templates to English-only format for better international accessibility
- Simplify bug report and feature request templates with clearer structure
- Add standardized pull request template with contribution guidelines
- Disable blank issues and update documentation links in issue config
- Add comprehensive copilot instructions with coding standards and best practices
- Add enableTranslationMerge parameter to control translation merging
- Default to false for better performance, especially for single-language sites
- Update comments to reflect the new default behavior
- Implement conditional translation merging in global.html"
- Add enableTranslationMerge parameter to control translation merging
- Default to false for better performance, especially for single-language sites
- Update comments to reflect the new default behavior
- Implement conditional translation merging in global.html"
> [!NOTE]
> This won't create new pages, if you need empty placeholder pages, you might need [shortcode-missing-translation](https://github.com/hugo-fixit/shortcode-missing-translation).
* ✨ Feat: add support for math passthrough render hook
* ✨ Feat: enable copy-tex extension for KaTeX server-side render
* ✨ Feat: enhance mathematical rendering support with KaTeX and MathJax configurations
* ✨ Feat: add KaTeX error handling and custom macros map config
* ✨ Feat: add MathJax client-side rendering as an alternative math engine
* ✨ Feat: update MathJax CDN configuration and enhance asset loading parameters
* 🔥 Feat: remove unused KaTeX math rendering scripts and update KaTex
* ✨ Feat: make \KaTeX command work in MathJax
* ✨ Feat: update KaTeX CDN links for Twikoo integration
* ⚡ Perf: Math in content encryption
* 🐛 Fix: update class name from 'fi-row' to 'fi-raw' in raw.html shortcode
* 🐛 Fix: correct MathJax math delimiters in load-mathjax.js
* ✨ Feat: enhance MathJax configuration with additional tex parameters and update asset handling
* 🐛 Fix: adjust KaTeX display overflow behavior
* feat: ✨ More markers can be added to mapbox
* 🐛 Fix: move mapbox param `markers` to **seventh** positional parameter
---------
Co-authored-by: Cell <1024@lruihao.cn>
A clear and concise description of what the bug is.
一段简短的对于你遇到的错误的描述。
value:|
Thanks for taking the time to fill out this bug report!
- type:textarea
id:expected
id:bug-description
attributes:
label:Expected behavior 期待的行为
description:|
A clear and concise description of what you expected to happen.
一段简短的对于你期待的行为的描述。
- type:textarea
id:screenshots
label:Description
description:A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder:Bug description
validations:
required:true
- type:input
id:reproduction
attributes:
label:Screenshots 屏幕截图
description:|
If applicable, add screenshots to help explain your problem.
如果可以的话,提供屏幕截图对解决问题很有帮助。
label:Reproduction
description:Please provide a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required.
placeholder:Reproduction
validations:
required:true
- type:dropdown
id:installation-method
attributes:
label:Installation Method
description:Select the installation method you used.
options:
- Hugo Module
- Git Submodule
- Git Clone
- Manual
- Other
validations:
required:true
- type:textarea
id:environment
attributes:
label:Build Environment 构建环境
label:Build Environment
description:|
Please try to use Hugo **extended** version before opening the issue.
请在创建 issue 之前尝试使用 Hugo **extended** 版本。
placeholder:|
- OS: [e.g. Windows 10, macOS, Ubuntu]
- Theme version/commit [e.g. 0.2.0, 2ccba79]
- Hugo version [e.g. 0.69.0]
- type:textarea
id:preview
attributes:
label:Preview Environment 预览环境
placeholder:|
- OS: [e.g. Windows 10, macOS, Ubuntu, iOS, Android]
- Browser [e.g. Chrome, Safari, Firefox]
- Hugo version [e.g. 0.147.0]
- OS: [e.g. Windows 10, macOS, Ubuntu]
validations:
required:true
- type:textarea
id:additional
attributes:
label:Additional Information 补充信息
label:Additional Information
description:|
Configuration files or front matter code ...
配置文件或者前置参数的代码……
Configuration files or front matter code snippets that may help us understand the issue.
description:"Suggest an idea for this project 为这个项目提供一个建议"
title:"[FEATURE] Some feature"
labels:["enhancement"]
name:Feature Request
description:Suggest an idea for this project
title:'[Feature request] '
body:
- type:textarea
id:describe
attributes:
label:Describe the feature you want 描述你的功能需求
description:|
Please submit new issues for different features.
请针对不同的功能建议提交新的 issue。
placeholder:|
I recommend adding this feature ...
我希望添加这样的一个功能……
- type:textarea
id:reference
attributes:
label:Useful reference 有价值的参考
description:|
If available, provide useful links to fulfill the feature.
如果可以的话,提供实现这个功能的相关参考链接。
- type:markdown
attributes:
value:|
Thanks for your interest in the project and taking the time to fill out this feature request!
- type:textarea
id:feature-description
attributes:
label:Clear and concise description of the problem
description:As a user or developer using FixIt, what feature your want in details. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder:Feature description
validations:
required:true
- type:textarea
id:suggested-solution
attributes:
label:Suggested solution
description:We could provide following implementation...
placeholder:Suggested solution
validations:
required:true
- type:textarea
id:alternative
attributes:
label:Alternative
description:Clear and concise description of any alternative solutions or features you've considered.
placeholder:Alternative solution
- type:textarea
id:additional-context
attributes:
label:Additional context
description:Any other context or screenshots about the feature request here.
Before submitting the PR, please make sure you do the following:
- Read the [Contributing Guidelines](https://github.com/hugo-fixit/FixIt/blob/main/CONTRIBUTING.md).
- Provide a description in this PR that addresses **what** the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. `close #123`).
-->
### Description
<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->
- [ ] Bug fix
- [ ] New feature
- [ ] Other
### Screenshots
<!-- If your PR includes UI changes, please provide before/after screenshots. If there are any other images that add context to the PR, add them here as well -->
This document defines the detailed coding standards for the FixIt theme project. For project overview, architecture, and development commands, see [CLAUDE.md](../../CLAUDE.md).
## SCSS Coding Standards
### Naming
- **CSS classes**: BEM or semantic naming (`header-desktop`, `menu-item`, `post-tag`)
-`packages/versioning` — Version management (auto-updates version in `layouts/_partials/init/index.html` during pre-commit)
-`packages/integration` — Post-build: merges demo/test output into `public/`
-`packages/chroma-lexers` — Generates Chroma lexer SCSS map from GitHub
### JavaScript Module System (`assets/js/`)
Service-class architecture with direct constructor calls:
- **`main.ts`** — Entry point. Instantiates all modules with direct constructor calls, builds the typed `window.fixit` public API facade, and runs the init sequence on `DOMContentLoaded`.
- **`types/`** — TypeScript type definitions:
-`config.ts` — `FixItConfig` and all config sub-types.
-`ui.ts` — `FixItPublicAPI`, global `window` augmentation for third-party libs.
-`third-party.ts` — Types for vendored libraries.
- **`core/`** — Infrastructure layer:
-`event-bus.ts` — Typed event bus singleton wrapping DOM `CustomEvents`. Exports `eventBus` (module-level singleton) and `FixItEventMap` type.
-`tokens.ts` — Service interfaces (`CoreService`, `ThemeService`, `CodeService`, etc.) used for module constructor typing.
- **`modules/`** — Feature modules. Each is a class implementing its service interface. Dependencies are constructor-injected. Private state uses ES6 `#` fields. Modules: charts, code, content, core, encryption, events, menu, misc, search, theme, toc. `pagefind.ts` is a standalone factory consumed by `SearchModule`.
- **`utils/`** — Pure utility functions (no side effects, no DOM state). Re-exported from `utils/index.ts`.
- **`head/`** — `color-scheme.ts` runs synchronously in `<head>` before body render to prevent flash of wrong theme.
- **`pages/`** — Page-specific scripts (e.g. `link.ts` for the link guard redirection page).
Cross-module communication uses the shared `eventBus` singleton, not direct module imports. The `window.fixit` facade exposes a typed public API for user custom scripts (`custom.ts`): theme control, scroll state, mask overlay management, content re-initialization, and the event bus.
Hugo Pipes processes all assets. The key orchestration is in `_partials/base/assets.html`:
- **CSS**: `scss/main.scss` is the entry point importing `core/`, `pages/`, `widgets/`, `custom`. SCSS variables are configured via `hugo:vars` (user-configurable from `[params.appearance]`) and `hugo:vars/internal` (theme system config). UnoCSS utility classes are pre-built to `assets/css/unocss.css` (via `pnpm unocss`), loaded before the main SCSS bundle.
- **JS**: `_partials/function/js-build.html` wraps `js.Build` with minify-in-production defaults. Hugo's `@params` injection passes config values into TypeScript at build time.
- **Third-party libraries**: Stored in `assets/lib/` (vendored, not npm-managed). Tracked by `librarybot.yml` and updated weekly by the `hugo-fixit/librarybot` GitHub Action. Can be overridden via CDN config in `assets/data/cdn/jsdelivr.yml` or `unpkg.yml`.
### Theme Configuration
- **`hugo.toml`** — Default theme configuration (1700+ lines). Uses `_merge = "shallow"` to let user configs override without deep merging.
- **`theme.toml`** — Theme metadata
## Coding Standards
### SCSS (`assets/scss/`)
- CSS classes: BEM or semantic naming (`header-desktop`, `menu-item`)
│ └── versioning/ # Version management (pre-commit)
├── static/ # Static files
├── hugo.toml # Default theme configuration
├── uno.config.ts # UnoCSS configuration
└── package.json # npm scripts and dependencies
```
Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls> to submit your contribution 🎉
## Git Commit Guidelines
## Git standard for developers
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. This enables automatic changelog generation using our custom template: [conventional.hbs](https://github.com/Lruihao/auto-changelog-plus/blob/main/settings/conventional.hbs).
### Branches
> [!NOTE]
>
> Commits in a PR will normally be squashed into one commit, so you don't need to rebase locally.
| Branch | Description |
| :-- | :-- |
| master | _The branch open to the public and release versions_ |
| dev | _The development branch of the next version_ |
| RC branch | _The release candidate branch of the next version, e.g. v0.2.12-RC_ |
| single feature | _The branch to enhancements or fixes_ |
### Commit Message Format
### Merge events
```
<type>(<scope>): <subject>
^ ^ ^
| | |__ Subject: Concise description of the change (imperative mood, lowercase).
| |____________ Scope: The specific part of the codebase affected (optional but recommended).
|___________________ Type: Indicates the kind of change.
```
| event | merge |
| :-- | :-- |
| release | **RC branch => master:**`--rebase` |
| PR | **others:master => master:**`--rebase` |
| single feature| **feature branch => RC branch:**`--merge` |
> [!NOTE]
>
> - Keep the subject line concise and ideally within 72 characters.
> - If the change is more than a sentence, add a body.
> - Do not include secrets (tokens/keys) or personal data in commit messages.
> - Do not invent issue/PR numbers or facts that are not present in the diff.
### Commit message
### Allowed Types
#### Format
-`feat`: A new feature.
-`fix`: A bug fix.
-`refactor`: Code changes that neither fix a bug nor add a feature.
-`chore`: Changes to the build process, auxiliary tools, libraries, documentation generation etc.
-`docs`: Documentation only changes.
- Other conventional types like `perf`, `style`, `test`, `ci`, `build` are also acceptable.
`[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]`
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| :recycle: | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result |
[](https://github.com/hugo-fixit/FixIt/releases)
[FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
# FixIt
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).[^1]
> It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.
[](https://github.com/hugo-fixit/FixIt/releases)
[](https://gitee.com/lruihao/FixIt/stargazers)
## Getting started
> [!WARNING]
> **The `main` branch contains the v1 code. For upgrade instructions, see the [v1 migration guide](https://fixit.lruihao.cn/guides/upgrade-to-v1/).**\
> Version 1.0.0 is planned for release in **the first half of 2027**. Welcome to join the development and [discussion](https://github.com/orgs/hugo-fixit/discussions/723)!
Alternatively, you can run the [documentation site](https://fixit.lruihao.cn/) locally. For more details, see [hugo-fixit/docs](https://github.com/hugo-fixit/docs).
Head to the [Quick Start](https://fixit.lruihao.cn/docs/getting-started/quick-start/) page for a step-by-step guide on how to create a new website with FixIt.
To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme.
- Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
- Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
- **Search** supported by [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/)
- **Search** supported by [algolia](https://www.algolia.com/), [Fuse.js](https://fusejs.io/), [Pagefind](https://pagefind.app), CSE or [PostChat](https://ai.zhheo.com/console/login?InviteID=85041330)
- **Custom Search Engine (CSE)** supported by [Google](https://programmablesearchengine.google.com/)
- **Twemoji** supported
- Automatically **highlighting** code
- **Copy code** to clipboard with one click
@@ -85,15 +146,19 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
- Extended Markdown syntax for **ruby annotation**
- Extended Markdown syntax for **fraction**
-**Mathematical formula** supported by [KaTeX](https://katex.org/)
- **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
- **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
-Multiple **admonitions** shortcode or **alerts** extended Markdown syntax
- **Tabs** and **Tab** shortcode with multiple design styles
- **Mathematical formula** supported by [KaTeX](https://katex.org/) or [MathJax](https://www.mathjax.org)
- **Diagrams** code fences extended and shortcode supported by [mermaid](https://github.com/knsv/mermaid)
- **Interactive data visualization** shortcode and code fences extended supported by [ECharts](https://echarts.apache.org/)
- **Timeline** code fences extended and shortcode supported
- **File tree** code fences extended and shortcode supported
- **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
- **Bilibili player** shortcode
- Kinds of **admonitions** shortcode
- **Bilibili player** and **Douyin player** shortcode
- **Custom style** shortcode
- **Custom script** shortcode
- Open more **custom blocks**
- **Animated typing** supported by [TypeIt](https://typeitjs.com/)
- **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
- **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
@@ -101,9 +166,14 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- Options to **cache remote image** locally
- ...
## Multilingual and i18n
</details>
FixIt supports the following languages:
## Multilingual and I18n
FixIt supports multilingual and i18n. For more information, see the [Content Management](https://fixit.lruihao.cn/docs/content-management/introduction#multilingual) documentation. You are welcome to [contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls).
<details>
<summary>FixIt supports the following languages.</summary>
- English
- Simplified Chinese
@@ -118,38 +188,110 @@ FixIt supports the following languages:
- Russian
- Romanian
- Vietnamese
-[Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)
All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker.
## Theme Components
To balance **simplicity** and **extensibility**, FixIt theme provides extra [Hugo theme components](https://fixit.lruihao.cn/ecosystem/#-components) for customization.
A mirror is available on Gitee for users in mainland China: [gitee.com/lruihao/FixIt](https://gitee.com/lruihao/FixIt)
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
We welcome you to join the development of FixIt. Please see [contributing document](/CONTRIBUTING.md). 🤗
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).
**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
## [Contributors](contributors.md)
> [!note]
> When contributing, please first discuss the change you wish to make via a discussion on this repository before making the actual change.
## Acknowledgements
<details>
<summary>Thanks to the authors of following resources included in the theme:</summary>
Thanks to the support of [all contributors](https://github.com/hugo-fixit/FixIt/graphs/contributors)!
Thanks to the [Hugo DoIt](https://github.com/HEIGE-PCloud/DoIt) theme and [Hexo NexT](https://github.com/next-theme/hexo-theme-next) theme for inspiration and reference.
<details>
<summary>Thanks to all the open source projects used in the FixIt theme.</summary>
If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!
- [PayPal](https://paypal.me/Lruihao)
- [Alipay](images/alipay.jpg)
- [Wechat](images/wechatpay.jpg)
Don't forget to leave a ⭐️ if you like this theme, thanks!
[^1]: The theme name is interesting: "leave it, keep it, love it, fix it". Appears and leaves, loves but cannot keep. Doesn't it look like that damn love and BUG? 🤣
[Lruihao](https://github.com/Lruihao "Follow me on GitHub")
[](https://github.com/hugo-fixit/FixIt/releases)
[](https://github.com/hugo-fixit/FixIt/releases)
- Third-party integrations (comments, analytics) should be configured securely
## Reporting a Vulnerability
If you want to report a vulnerability, create a new issue at https://github.com/hugo-fixit/FixIt/issues. Any vulnerabilities will be fixed as soon as possible.
We take security seriously and appreciate your help in keeping FixIt secure.
### How to Report
1.**Create an Issue**: Report vulnerabilities at https://github.com/hugo-fixit/FixIt/issues
2.**Private Disclosure**: For sensitive security issues, email the maintainers directly
3.**Include Details**: Provide clear steps to reproduce the vulnerability
### What to Include
- **Description**: Clear description of the vulnerability
- **Impact**: Potential impact and severity
- **Reproduction**: Step-by-step instructions to reproduce
- **Environment**: Hugo version, theme version, and platform details
- **Solution**: Suggested fix if you have one
### Response Timeline
- **Acknowledgment**: Within 48 hours
- **Initial Assessment**: Within 1 week
- **Status Updates**: Weekly updates on progress
- **Resolution**: Security fixes are prioritized and released as soon as possible
### Disclosure Policy
- We follow responsible disclosure practices
- We will coordinate with you on the disclosure timeline
A blog (a truncation of "weblog") is an informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in reverse chronological order so that the most recent post appears first, at the top of the web page. Until 2009, blogs were usually the work of a single individual,[citation needed] occasionally of a small group, and often covered a single subject or topic. In the 2010s, "multi-author blogs" (MABs) emerged, featuring the writing of multiple authors and sometimes professionally edited. MABs from newspapers, other media outlets, universities, think tanks, advocacy groups, and similar institutions account for an increasing quantity of blog traffic. The rise of Twitter and other "microblogging" systems helps integrate MABs and single-author blogs into the news media. Blog can also be used as a verb, meaning to maintain or add content to a blog.
// This code block will be expanded regardless of its length.
```
````
## No wrapper
Set `wrapper=false` to disable code wrapper.
```js {wrapper=false}
function add(a, b) {
return a + b
}
```
```js {wrapper=false, lineNos=false}
function add(a, b) {
return a + b
}
```
## lineNos=false
```js {lineNos=false}
function add(a, b) {
return a + b
}
```
## lineNumbersInTable=false
> [!WARNING]
> Not recommended!
```js {lineNumbersInTable=false}
function add(a, b) {
return a + b
}
```
## Diff Code
```diff
- theme = "LoveIt"
+ theme = "FixIt"
! enhancements and fixes
```
## Long Code
```html
<p>Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.</p>
```
<p>Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.</p>
## Code Toggle
```toggle {before_tabs="hugo."}
[params]
description = ''
keywords = []
[params.codeblock]
mode = 'classic'
wrapper = true
```
## Mermaid
```mermaid
flowchart TD
A[Start] --> B{Is it?}
B -->|Yes| C[OK]
C --> D[Rethink]
D --> B
B ---->|No| E[End]
```
## ECharts
```echarts
[title]
text = "Summary Line Chart"
top = "2%"
left = "center"
[tooltip]
trigger = "axis"
[legend]
data = [
"Email Marketing",
"Affiliate Advertising",
"Video Advertising",
"Direct View",
"Search Engine"
]
top = "10%"
[grid]
left = "5%"
right = "5%"
bottom = "5%"
top = "20%"
containLabel = true
[toolbox]
left = "left"
[toolbox.feature]
[toolbox.feature.saveAsImage]
title = "Save as Image"
[xAxis]
type = "category"
boundaryGap = false
data = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
]
[yAxis]
type = "value"
[[series]]
name = "Email Marketing"
type = "line"
stack = "Total"
data = [
120.0,
132.0,
101.0,
134.0,
90.0,
230.0,
210.0
]
[[series]]
name = "Affiliate Advertising"
type = "line"
stack = "Total"
data = [
220.0,
182.0,
191.0,
234.0,
290.0,
330.0,
310.0
]
[[series]]
name = "Video Advertising"
type = "line"
stack = "Total"
data = [
150.0,
232.0,
201.0,
154.0,
190.0,
330.0,
410.0
]
[[series]]
name = "Direct View"
type = "line"
stack = "Total"
data = [
320.0,
332.0,
301.0,
334.0,
390.0,
330.0,
320.0
]
[[series]]
name = "Search Engine"
type = "line"
stack = "Total"
data = [
820.0,
932.0,
901.0,
934.0,
1290.0,
1330.0,
1320.0
]
```
## Timeline
```timeline
events:
- timestamp: 2024-07-11
content: Success
- timestamp: 2024-07-13
content: Approved
- timestamp: 2024-07-15
content: Event start
```
## JSON
```json
{
"name": "FixIt",
"version": "0.4.0",
"description": "A clean, elegant but advanced blog theme for Hugo",
"keywords": ["Hugo", "theme", "FixIt"]
}
```
## File Tree
{{< file-tree >}}
- name: src
type: dir
children:
- name: index.ts
type: file
- name: app.ts
type: file
- name: package.json
type: file
{{< /file-tree >}}
## Code block inside other blocks
> [!NOTE]+
>
> ```js {mode="classic"}
> function add(a, b) {
> return a + b
> }
> ```
{{< typeit code=java >}}
public class HelloWorld {
public static void main(String []args) {
System.out.println("Hello World");
}
}
{{< /typeit >}}
{{< details "Code Block inside Details" >}}
```js {mode="classic"}
function add(a, b) {
return a + b
}
```
{{< /details >}}
## Highlighting
Highlighting in code fences is enabled by default.
```js {linenostart=287,hl_lines=[2,"8-10"]}
/**
* check if a string is a JS object string
* @example isObjectLiteral("{a:1,b:2}") // true
* @param {string} str string to check
* @returns {boolean} whether the string is a JS object string
title: اختبار دعم اللغة العربية والكتابة من اليمين إلى اليسار
date: 2026-08-23T10:00:00+08:00
collections:
- اختبارات
categories:
- ميزات
tags:
- RTL
- عربي
- اختبار
---
هذا مقال اختباري شامل لدعم اللغة العربية والكتابة من اليمين إلى اليسار في سمة [FixIt](https://github.com/hugo-fixit/FixIt/). يهدف هذا المقال إلى اختبار جميع عناصر الويب المختلفة مع المحتوى العربي.
<!--more-->
## المقدمة
مرحباً بكم في هذا المقال الاختباري الشامل. اللغة العربية هي واحدة من أكثر اللغات انتشاراً في العالم، وتتميز بكتابتها من اليمين إلى اليسار. يتطلب دعم هذه اللغة في تصميمات الويب اهتماماً خاصاً بالعديد من الجوانب التقنية.
### لماذا RTL مهم؟
عندما نصمم مواقع ويب تدعم اللغات التي تُكتب من اليمين إلى اليسار، يجب علينا مراعاة عدة عوامل:
- **اتجاه النص**: يجب أن يتدفق النص بشكل طبيعي من اليمين إلى اليسار
- **تخطيط الصفحة**: يجب أن تكون العناصر مرتبة بشكل منطقي
- **الرموز والأيقونات**: قد تحتاج بعضها إلى انعكاس
- **التباعد بين الأسطر**: يحتاج النص العربي إلى مساحة أكبر للتشكيل
## النص المختلط
هذا نص يحتوي على كلمات إنجليزية مثل JavaScript و HTML و CSS مع نص عربي. يجب أن يظهر كل شيء بشكل صحيح.
## الروابط
- [موقع Hugo](https://gohugo.io)
- [سمة FixIt](https://fixit.lruihao.cn)
- [وثائق RTL](https://rtlstyling.com)
## القوائم
القوائم غير المرتبة:
- عنصر القائمة الأول
- عنصر القائمة الثاني
- عنصر القائمة الثالث
- عنصر فرعي
- عنصر فرعي آخر
القوائم المرتبة:
1. الخطوة الأولى في العملية
2. الخطوة الثانية
3. الخطوة الثالثة والأخيرة
قوائم المهام:
- [x] إعداد بيئة التطوير
- [x] كتابة المحتوى الأساسي
- [ ] اختبار التوافق مع المتصفحات
- [ ] مراجعة التصميم النهائي
- [ ] نشر الموقع
## الجداول
| اللغة | الاتجاه | الحروف المتصلة |
| ---------: | ------: | -------------: |
| العربية | RTL | نعم |
| الفارسية | RTL | نعم |
| العبرية | RTL | لا |
| الإنجليزية | LTR | لا |
## الاقتباسات
> العلم نور والجهل ظلام
> — مثل عربي
اقتباس طويل:
> إن الله لا يغير ما بقوم حتى يغيروا ما بأنفسهم وإذا أراد الله بقوم سوءاً فلا مرد له وما لهم من دونه من وال
## الأيقونات
أيقونات يتم قلبها في RTL:
- :(fa-solid fa-tag): وسم
- :(fa-solid fa-tags): وسوم
- :(fa-solid fa-folder): مجلد
- :(fa-solid fa-folder-open): مجلد مفتوح
- :(fa-solid fa-pen-to-square): قلم تعديل
أيقونات لا يتم قلبها في RTL:
- :(fa-solid fa-share): مشاركة
- :(fa-solid fa-search): بحث
## التبويبات
{{< tabs >}}
{{% tab title="العلامة الأولى" %}}
محتوى التبويب الأول.
{{% /tab %}}
{{% tab title="العلامة الثانية" %}}
محتوى التبويب الثاني.
{{% /tab %}}
{{< /tabs >}}
## التفاصيل القابلة للطي
<details>
<summary>انقر لعرض التفاصيل</summary>
هذا محتوى مخفي يمكنBOOLE توسيعه بالنقر.
المحتوى يمكن أن يكون نصاً أو كوداً أو أي عنصر آخر.
</details>
## التنبيهات
{{< admonition >}}
هذا تنبيه عادي يحتوي على معلومات مفيدة للمستخدم.
{{< /admonition >}}
> [!IMPORTANT]
> تأكد من اختبار جميع التغييرات قبل النشر.
## المحتوى المشفر
{{< fixit-encryptor password="1212" message="أدخل كلمة المرور (1212) لعرض المحتوى" >}}
هذا محتوى مشفر. يجب إدخال كلمة المرور لعرضه.
{{< /fixit-encryptor >}}
## أمثلة على المحتوى LTR
في صفحة RTL، بعض العناصر تبقى باتجاه LTR لأن محتاها لغوي بحت أو برمجي. فيما يلي أمثلة:
### كتلة الكود
```c
#include<stdio.h>
intmain(){
printf("Hello, World!\n");
return0;
}
```
### عارض JSON
```json
{
"name":"FixIt",
"version":"1.0.0",
"features":["RTL","i18n","shortcodes"]
}
```
### تبويبات الكود
```python {group=tab1}
print("Python")
```
```go {group=tab1}
fmt.Println("Go")
```
### الصيغ الرياضية
معادلة بسيطة: $E = mc^2$
معادلة معقدة:
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
### مخططات Mermaid
```mermaid
graph LR
A[بداية] --> B[عملية]
B --> C[نهاية]
```
---
{.awesome-hr}
_تم إنشاء هذا المقال لاختبار دعم اللغة العربية في سمة FixIt._
A comprehensive test article for Arabic language and Right-to-Left layout support in the [FixIt](https://github.com/hugo-fixit/FixIt/) theme. This article tests various web elements with Arabic content.
<!--more-->
## Introduction
Welcome to this comprehensive test article. Arabic is one of the most widely spoken languages in the world, characterized by its Right-to-Left writing direction. Supporting this language in web designs requires special attention to many technical aspects.
### Why RTL Matters
When designing websites that support Right-to-Left languages, we need to consider several factors:
- **Text direction**: Text should flow naturally from right to left
- **Page layout**: Elements should be arranged in a logical order
- **Symbols and icons**: Some may need to be mirrored
- **Line spacing**: Arabic text needs more space for diacritics
## Mixed Text
This text contains English words like JavaScript, HTML, and CSS alongside Arabic text. Everything should display correctly.
## Links
- [Hugo Website](https://gohugo.io)
- [FixIt Theme](https://fixit.lruihao.cn)
- [RTL Styling](https://rtlstyling.com)
## Lists
Unordered lists:
- First list item
- Second list item
- Third list item
- Sub item
- Another sub item
Ordered lists:
1. First step in the process
2. Second step
3. Third and final step
Task lists:
- [x] Set up development environment
- [x] Write basic content
- [ ] Test browser compatibility
- [ ] Review final design
- [ ] Deploy website
## Tables
| Language | Direction | Connected Letters |
| ---------- | --------- | ----------------- |
| Arabic | RTL | Yes |
| Persian | RTL | Yes |
| Hebrew | RTL | No |
| English | LTR | No |
## Blockquotes
> Knowledge is light and ignorance is darkness
> — Arabic proverb
Long quote:
> Indeed, Allah does not change the condition of a people until they change what is in themselves
## Icons
Icons that are flipped in RTL:
- :(fa-solid fa-tag): Tag
- :(fa-solid fa-tags): Tags
- :(fa-solid fa-folder): Folder
- :(fa-solid fa-folder-open): Folder Open
- :(fa-solid fa-pen-to-square): Edit
Icons that are NOT flipped in RTL:
- :(fa-solid fa-share): Share
- :(fa-solid fa-search): Search
## Tabs
{{< tabs >}}
{{% tab title="First Tab" %}}
Content of the first tab.
{{% /tab %}}
{{% tab title="Second Tab" %}}
Content of the second tab.
{{% /tab %}}
{{< /tabs >}}
## Collapsible Details
<details>
<summary>Click to show details</summary>
This is hidden content that can be expanded by clicking.
Content can be text, code, or any other element.
</details>
## Alerts
{{< admonition >}}
This is a regular admonition with useful information for the user.
{{< /admonition >}}
> [!IMPORTANT]
> Make sure to test all changes before deploying.
## Encrypted Content
{{< fixit-encryptor password="1212" message="Enter password (1212) to view content" >}}
This is encrypted content. You must enter the password to view it.
{{< /fixit-encryptor >}}
## LTR Content Examples
In an RTL page, some elements remain in LTR direction because their content is purely linguistic or programmatic. Here are examples:
### Code Block
```c
#include<stdio.h>
intmain(){
printf("Hello, World!\n");
return0;
}
```
### JSON Viewer
```json
{
"name":"FixIt",
"version":"1.0.0",
"features":["RTL","i18n","shortcodes"]
}
```
### Code Tabs
```python {group=tab1}
print("Python")
```
```go {group=tab1}
fmt.Println("Go")
```
### Math
Simple equation: $E = mc^2$
Complex equation:
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
### Mermaid Diagram
```mermaid
graph LR
A[Start] --> B[Process]
B --> C[End]
```
---
_Created to test Arabic language support in the FixIt theme._
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.