render_markdown_codehighlight

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

RenderMarkdownCodehighlight Plugin

The RenderMarkdownCodehighlight plugin improves the readability of code snippets within Markdown content by integrating highlight.js for syntax highlighting. It supports dynamic theme switching, allowing code blocks to adapt seamlessly to either light or dark themes based on your application's current theme. This makes code blocks more visually appealing and easier to read.

Features

Dynamic Theme Switching: Automatically switches between light and dark modes for code highlighting based on the selected theme. Theme Support: Supports various highlight.js themes, with some themes designed for both light and dark modes, while others are specifically tailored for one mode.

Theme Types

theme-all: These themes support both light and dark modes, automatically adjusting based on the application's current theme. theme-light: These themes are optimized for light mode and will use default dark mode. theme-dark: These themes are designed specifically for dark mode and will use default light mode.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Info embed.FS
View Source
var ThemeList = []string{
	"1c-light",
	"a11y-all",
	"agate-dark",
	"an-dark",
	"androidstudio-dark",
	"arduino-light",
	"arta-dark",
	"ascetic-light",
	"atom-all",
	"brown-light",
	"codepen-dark",
	"color-light",
	"dark-dark",
	"default-light",
	"devibeans-dark",
	"docco-light",
	"far-dark",
	"felipec-dark",
	"foundation-light",
	"github-all",
	"gml-dark",
	"googlecode-light",
	"gradient-all",
	"grayscale-light",
	"hybrid-dark",
	"idea-light",
	"intellij-light",
	"ir-dark",
	"isbl-all",
	"kimbie-all",
	"lightfair-light",
	"lioshi-dark",
	"magula-light",
	"mono-light",
	"monokai-dark",
	"night-dark",
	"nnfx-all",
	"nord-dark",
	"obsidian-dark",
	"panda-all",
	"paraiso-all",
	"pojoaque-light",
	"purebasic-light",
	"qtcreator-all",
	"rainbow-dark",
	"routeros-light",
	"school-light",
	"shades-dark",
	"srcery-dark",
	"stackoverflow-all",
	"sunburst-dark",
	"tokyo-all",
	"tomorrow-dark",
	"vs-light",
	"vs2015-dark",
	"xcode-light",
	"xt256-dark",
}

Functions

This section is empty.

Types

type Render

type Render struct {
	Config *RenderConfig
}

func (*Render) ConfigFields

func (r *Render) ConfigFields() []plugin.ConfigField

func (*Render) ConfigReceiver

func (r *Render) ConfigReceiver(config []byte) error

func (*Render) GetRenderConfig

func (r *Render) GetRenderConfig(ctx *gin.Context) (renderConfig *plugin.RenderConfig)

func (*Render) Info

func (r *Render) Info() plugin.Info

type RenderConfig

type RenderConfig struct {
	SelectTheme string `json:"select_theme"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL