mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
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:
@@ -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
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user