Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cosZone/astro-koharu
/ functions
Functions
813 in github.com/cosZone/astro-koharu
⨍
Functions
813
◇
Types & classes
277
↓ 1 callers
Function
postExists
(link: string | undefined, title: string, categoryPath: string[])
scripts/koharu/utils/new-operations.ts:286
↓ 1 callers
Function
prepareFrontmatterForApi
* Prepare frontmatter for API transmission * Converts Date objects to local time strings to prevent JSON.stringify * from converting them to UTC ISO
cms/src/lib/api.ts:82
↓ 1 callers
Function
preprocessShokaSyntax
( source: string, options?: { enableContainers?: boolean; enableHexoTags?: boolean; enableSupe
src/lib/markdown/shoka-preprocessor.ts:354
↓ 1 callers
Function
processFile
* Process a single markdown file
src/scripts/generateSimilarities.ts:195
↓ 1 callers
Function
processFile
(filePath: string)
src/scripts/generateSummaries.ts:172
↓ 1 callers
Function
processImage
* Process a single image and generate gradient CSS
src/scripts/generateLqips.ts:47
↓ 1 callers
Function
processInlineSuperSub
* Process inline ~sub~ and ^sup^ syntax, skipping protected regions. * Must be done before GFM parsing to avoid ~text~ being treated as strikethrough
src/lib/markdown/shoka-preprocessor.ts:314
↓ 1 callers
Function
readPost
(postId: string)
cms/src/lib/api.ts:101
↓ 1 callers
Function
reinterpretUtcAsTimezone
(date: Date)
src/lib/date.ts:122
↓ 1 callers
Function
removeDeletedUpstreamFiles
* Clean 模式:删除上游已移除的非用户内容文件
scripts/koharu/utils/update-operations.ts:339
↓ 1 callers
Function
render
()
cms/src/components/MarkdownPreview.tsx:79
↓ 1 callers
Function
renderAudioMedia
(items: MediaItem[])
src/lib/markdown/shoka-renderers.ts:58
↓ 1 callers
Function
renderCurrentInput
()
scripts/koharu/creators/friend-creator.tsx:206
↓ 1 callers
Function
renderCurrentInput
()
scripts/koharu/creators/post-creator.tsx:195
↓ 1 callers
Function
renderFriendLinks
(items: FriendLinkData[])
src/lib/markdown/shoka-renderers.ts:42
↓ 1 callers
Function
renderInfographics
* Render infographic charts
cms/src/lib/preview-enhancer.ts:280
↓ 1 callers
Function
renderMarkdown
(content: string)
cms/src/lib/markdown-render.ts:138
↓ 1 callers
Function
renderMermaidDiagrams
* Render mermaid diagrams
cms/src/lib/preview-enhancer.ts:194
↓ 1 callers
Function
renderPanelContent
()
src/components/bgm/GlobalBGMPlayer.tsx:114
↓ 1 callers
Function
renderVideoMedia
(items: MediaItem[])
src/lib/markdown/shoka-renderers.ts:75
↓ 1 callers
Function
replaceEmoji
Replace text emoji codes with actual emoji characters
src/components/markdown/quiz/QuizExplanation.tsx:10
↓ 1 callers
Function
resolve
()
src/components/markdown/AudioPlayer.tsx:57
↓ 1 callers
Function
resolveShareToken
Exchange a share slug for a JWT token via GET /api/share/<slug>
src/lib/umami-stats.ts:11
↓ 1 callers
Function
rgbToHex
* Convert RGB to hex string
src/scripts/generateLqips.ts:34
↓ 1 callers
Function
runGenerateAll
(options: GenerateOptions = {})
scripts/koharu/utils/generate-operations.ts:86
↓ 1 callers
Function
runScript
(scriptPath: string, args: string[] = [])
scripts/koharu/utils/generate-operations.ts:22
↓ 1 callers
Function
sanitizeCssColor
(color: string)
src/lib/markdown/shoka-renderers.ts:13
↓ 1 callers
Function
saveCache
* Save cache to file
cms/src/api/og-data.ts:76
↓ 1 callers
Function
saveCache
* Save cache to file system. * Prunes expired entries before writing to keep the file lean (important * because og-data.json is committed to git for
src/lib/markdown/remark-link-embed.ts:68
↓ 1 callers
Function
saveCache
(cache: SummariesCache)
src/scripts/generateSummaries.ts:100
↓ 1 callers
Function
saveResults
* Save results to JSON file
src/scripts/generateSimilarities.ts:315
↓ 1 callers
Function
scanAudioPlayers
(container: Element)
src/lib/content-scanner.ts:123
↓ 1 callers
Function
scanEncryptedBlocks
(container: Element)
src/lib/content-scanner.ts:191
↓ 1 callers
Function
scanEncryptedPosts
(container: Element)
src/lib/content-scanner.ts:174
↓ 1 callers
Function
scanFriendLinks
(container: Element)
src/lib/content-scanner.ts:103
↓ 1 callers
Function
scanNoteBlocks
(container: Element)
src/lib/content-scanner.ts:157
↓ 1 callers
Function
scanPreElements
(container: Element)
src/lib/content-scanner.ts:29
↓ 1 callers
Function
scanQuizElements
(container: Element)
src/lib/content-scanner.ts:59
↓ 1 callers
Function
scanVideoPlayers
(container: Element)
src/lib/content-scanner.ts:140
↓ 1 callers
Function
sendMessage
(message: T)
src/components/comment/providers/Giscus.tsx:9
↓ 1 callers
Function
serializeDateForApi
* Serialize a Date object to local time string for API transmission * Preserves the user's intended time without UTC conversion * * @param date - D
cms/src/lib/api.ts:70
↓ 1 callers
Function
serializeFrontmatter
(frontmatter: Record<string, unknown>)
cms/src/lib/frontmatter.ts:16
↓ 1 callers
Function
setCache
(key: string, data: MetingSong[])
src/lib/meting.ts:72
↓ 1 callers
Function
setCachedOGData
* Set OG data in memory cache (does NOT write to disk immediately). * Call `flushCache()` after batch processing to persist.
src/lib/markdown/remark-link-embed.ts:112
↓ 1 callers
Function
setStoredMode
(mode: PlayMode)
src/store/player.ts:32
↓ 1 callers
Function
setStoredVolume
(volume: number)
src/store/player.ts:55
↓ 1 callers
Function
setupCollapseAnimations
(container: Element)
src/lib/collapse-animation.ts:5
↓ 1 callers
Function
shokaMetaTransformer
()
src/lib/markdown/shiki-meta-transformer.ts:78
↓ 1 callers
Function
shuffleArray
* Fisher-Yates 洗牌算法 * 相比 sort(() => Math.random() - 0.5),能产生均匀分布的随机排列
src/lib/content/posts.ts:213
↓ 1 callers
Function
sortPosts
* Sorts posts based on sort and order parameters
cms/src/api/list.ts:174
↓ 1 callers
Function
stringToTags
* Parses tags string to array
cms/src/components/FrontmatterEditor.tsx:86
↓ 1 callers
Function
stripHtmlToText
(html: string, maxLength: number = 150)
src/lib/sanitize.ts:20
↓ 1 callers
Function
stripLocalePrefix
(slug: string)
scripts/save-slugs.ts:21
↓ 1 callers
Function
sync
()
src/hooks/usePlaybackTime.ts:25
↓ 1 callers
Function
tagExists
(tag: string)
scripts/koharu/utils/update-operations.ts:619
↓ 1 callers
Function
tagToSlug
(tag: string)
src/lib/content/tags.ts:17
↓ 1 callers
Function
tagsToString
* Formats tags array to string
cms/src/components/FrontmatterEditor.tsx:78
↓ 1 callers
Function
tarCreate
(archivePath: string, sourceDir: string)
scripts/koharu/utils/tar.ts:70
↓ 1 callers
Function
tarExtract
(archivePath: string, destDir: string)
scripts/koharu/utils/tar.ts:82
↓ 1 callers
Function
tarList
(archivePath: string)
scripts/koharu/utils/tar.ts:63
↓ 1 callers
Function
toRemixIconClass
(icon: string)
src/pages/rss/feed.xsl.ts:6
↓ 1 callers
Function
toggleDraft
(postId: string)
cms/src/lib/api.ts:214
↓ 1 callers
Function
toggleDrawer
()
src/store/modal.ts:116
↓ 1 callers
Function
toggleSticky
(postId: string)
cms/src/lib/api.ts:237
↓ 1 callers
Function
transliterateSlug
(slug: string)
src/lib/slug.ts:23
↓ 1 callers
Function
tryTranslate
* Try to translate a dynamic key that may or may not exist in the dictionary. * Unlike `t()`, accepts an arbitrary string key and returns `undefined`
src/i18n/utils.ts:61
↓ 1 callers
Function
updateActiveHeading
()
src/hooks/useActiveHeading.ts:54
↓ 1 callers
Function
updateCurrentHeading
()
src/hooks/useCurrentHeading.ts:70
↓ 1 callers
Function
updateMemoryCache
(url: string, data: OGData)
cms/src/lib/og-service.ts:64
↓ 1 callers
Function
useBangumiData
(userId: string)
src/hooks/useBangumiData.ts:23
↓ 1 callers
Function
useCopyToClipboard
()
src/hooks/useCopyToClipboard.ts:10
↓ 1 callers
Function
useCurrentHeading
({ offsetTop = 80 }: UseCurrentHeadingOptions = {})
src/hooks/useCurrentHeading.ts:243
↓ 1 callers
Function
useCustomCategories
()
cms/src/hooks/useCustomCategories.ts:21
↓ 1 callers
Function
useCycleSelectState
( options: SelectOption[], visibleOptionCount: number, defaultValue?: string, )
scripts/koharu/components/cycle-select/useCycleSelectState.ts:138
↓ 1 callers
Function
useDashboardState
()
cms/src/hooks/useDashboardState.ts:55
↓ 1 callers
Function
useEditorHeadings
(editor: BlockNoteEditor<any, any, any> | null)
cms/src/hooks/useEditorHeadings.ts:71
↓ 1 callers
Function
useEscapeKey
(handler: () => void, enabled = true)
src/hooks/useKeyboardShortcut.ts:160
↓ 1 callers
Function
useIsMobile
()
src/hooks/useMediaQuery.ts:56
↓ 1 callers
Function
useIsTablet
()
src/hooks/useMediaQuery.ts:61
↓ 1 callers
Function
useLrcText
Resolve LRC: if it's a URL, fetch it; otherwise use as-is.
src/components/markdown/audio-player/PlayerPreview.tsx:27
↓ 1 callers
Function
usePlaybackLrcIndex
(timeStore: PlaybackTimeStore, lrcLines: LrcLine[])
src/hooks/usePlaybackTime.ts:62
↓ 1 callers
Function
usePrefersReducedMotion
()
src/hooks/useMediaQuery.ts:71
↓ 1 callers
Function
useSearchKeyboardNav
(isOpen: boolean)
src/hooks/useSearchKeyboardNav.ts:26
↓ 1 callers
Function
useTheme
* Hook to manage theme state
src/components/theme/ThemeToggle.tsx:16
↓ 1 callers
Function
useVideoPlayer
(tracks: VideoTrack[], videoRef: RefObject<HTMLVideoElement | null>)
src/hooks/useVideoPlayer.ts:13
↓ 1 callers
Function
validatePathInBackupDir
(filePath: string)
scripts/koharu/utils/validation.ts:76
↓ 1 callers
Function
validateTarEntries
(entries: string[], archivePath: string)
scripts/koharu/utils/tar.ts:6
↓ 1 callers
Function
writePost
( postId: string, frontmatter: BlogSchema, content: string, categoryMappings?: Record<string, string>,
cms/src/lib/api.ts:131
↓ 1 callers
Function
yamlQuote
(value: string)
scripts/save-slugs.ts:32
Function
AlertDialogFooter
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
cms/src/components/ui/alert-dialog.tsx:54
Function
AlertDialogFooter
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
src/components/ui/alert-dialog.tsx:73
Function
AlertDialogHeader
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
cms/src/components/ui/alert-dialog.tsx:49
Function
AlertDialogHeader
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
src/components/ui/alert-dialog.tsx:68
Function
AnnouncementListPopup
()
src/components/announcement/AnnouncementListPopup.tsx:138
Function
AnnouncementToast
({ announcement, toastId }: { announcement: Announcement; toastId: string | number })
src/components/announcement/AnnouncementToaster.tsx:73
Function
AnnouncementToastContent
({ announcement }: { announcement: Announcement })
src/components/announcement/AnnouncementToaster.tsx:42
Function
AnnouncementToaster
()
src/components/announcement/AnnouncementToaster.tsx:108
Function
App
()
cms/src/App.tsx:239
Function
AppContent
()
cms/src/App.tsx:25
Function
AudioPlayer
({ element }: AudioPlayerProps)
src/components/markdown/AudioPlayer.tsx:32
← previous
next →
401–500 of 813, ranked by callers