feat: add JSON Viewer support and related configurations (#643)

* feat: add JSON Viewer support and related configurations

* feat: add JSON Viewer initialization and theme switching support
This commit is contained in:
Cell
2025-10-14 15:03:45 +08:00
committed by GitHub
parent 55a9cc7671
commit fa94e69877
23 changed files with 184 additions and 14 deletions
@@ -0,0 +1,84 @@
---
title: JSON Viewer Test
date: 2025-10-14T12:29:06+08:00
collections:
- Tests
categories:
- Markdown
tags:
- json
---
Testing JSON viewer in FixIt theme.
```json {boxed=false}
{
"foo": "bar"
}
```
<!--more-->
## JSON Viewer
```json
{
"name": "John Doe",
"age": 30,
"isEmployed": true,
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
},
"phoneNumbers": [
{
"type": "home",
"number": "555-1234"
},
{
"type": "work",
"number": "555-5678"
}
],
"children": [],
"spouse": null
}
```
disabled copy:
```json {copyable=false}
{
"foo": "bar"
}
```
## JSON Code
```json {enable=false}
{
"name": "John Doe",
"age": 30,
"isEmployed": true,
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
},
"phoneNumbers": [
{
"type": "home",
"number": "555-1234"
},
{
"type": "work",
"number": "555-5678"
}
],
"children": [],
"spouse": null
}
```