Front-matter values with BigInts
tags:
custom-fm
bigint
toml
Description/Summary
Test that front-matter values that are integers represented as
strings, but cannot be stored as 64-bit signed integers are
left as strings.
Content
In this test, the small integer “234” (i.e. the one that can be
represented as a 64-bit signed integer) is saved as an integer in the
TOML front-matter.
But the big integer “10040216507682529280” which would need more than
64-bits to be stored as a signed integer is left as a string in the
TOML front-matter.
Page (Debug)
Page Variable | Value |
Name |
"Front-matter values with BigInts"
|
Title |
"Front-matter values with BigInts"
|
ResourceType |
"page"
|
Kind |
"page"
|
Section |
"posts"
|
Draft |
false
|
Type |
"posts"
|
Layout |
""
|
Permalink |
"https://ox-hugo.scripter.co/test/posts/front-matter-bigint-value/"
|
RelPermalink |
"/posts/front-matter-bigint-value/"
|
Data |
page.Data{} (type:page.Data) |
|
NextPage | Front-matter mixed bag |
PrevPage | HTML Container with class |
NextInSection | Front-matter mixed bag |
PrevInSection | HTML Container with class |
Page Params (Debug)
Key | Type | Value |
big_int | string |
"10040216507682529280"
|
description | string |
" Test that front-matter values that are integers represented as\n strings, but cannot be stored as 64-bit signed integers are\n left as strings.\n "
|
draft | bool |
false
|
iscjklanguage | bool |
false
|
lastmod | time.Time |
2018-06-05 12:11:46 -0400 -0400
|
small_int | int64 |
234
|
tags | []string |
"custom-fm"
"bigint"
"toml"
|
title | string |
"Front-matter values with BigInts"
|
File Object (Debug)
FileInfo Variable | Value |
UniqueID |
"d5f5ac9a18af0a5438619271758a374b"
|
BaseFileName |
"front-matter-bigint-value"
|
TranslationBaseName |
"front-matter-bigint-value"
|
Lang |
"en"
|
Section |
"posts"
|
LogicalName |
"front-matter-bigint-value.md"
|
Dir |
"posts/"
|
Ext |
"md"
|
Path |
"posts/front-matter-bigint-value.md"
|