referator/test/footnotes.json.erb

31 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-09-29 21:02:57 +00:00
{
"self": [
2023-09-30 00:17:06 +00:00
<%- notes['self'].each_with_index do |note, index| -%>
2023-09-29 21:02:57 +00:00
{
"index": <%= Integer(note['index']).to_json %>,
2023-09-30 14:10:31 +00:00
"category": "self",
2023-09-29 21:02:57 +00:00
"id": <%= String(note['id']).to_json %>,
"slug": <%= String(note['slug']).to_json %>,
"anchor": <%= String(note['anchor']).to_json %>,
"fragment": <%= String(note['fragment']).to_json %>,
"url": <%= "#{note['id']}.html".to_json %>,
"text": <%= String(note['text']).to_json %>
2023-09-30 00:17:06 +00:00
}<%= ',' unless index == notes['self'].count - 1 %>
2023-09-29 21:02:57 +00:00
<%- end -%>
],
"link": [
2023-09-30 00:17:06 +00:00
<%- notes['link'].each_with_index do |note, index| -%>
2023-09-29 21:02:57 +00:00
{
"index": <%= Integer(note['index']).to_json %>,
2023-09-30 14:10:31 +00:00
"category": "link",
2023-09-29 21:02:57 +00:00
"id": <%= String(note['id']).to_json %>,
"slug": <%= String(note['slug']).to_json %>,
"anchor": <%= String(note['anchor']).to_json %>,
"fragment": <%= String(note['fragment']).to_json %>,
"url": <%= String(note['url']).to_json %>,
"text": <%= String(note['text']).to_json %>
2023-09-30 00:17:06 +00:00
}<%= ',' unless index == notes['link'].count - 1 %>
2023-09-29 21:02:57 +00:00
<%- end -%>
]
}