Replace only "categories" key
tags: front-matter keys replace categories
Description/Summary
This post will have the categories key in front-matter replaced with cats.
Content
This post will have the categories
key in front-matter replaced with
cats
.
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | " Replace only \"categories\" key\n " | |
Title | " Replace only \"categories\" key\n " | |
ResourceType | "page" | |
Kind | "page" | |
Section | "posts" | |
Draft | false | |
Type | "posts" | |
Layout | "" | |
Permalink | "https://ox-hugo.scripter.co/test/posts/replace-only-categories-key/" | |
RelPermalink | "/posts/replace-only-categories-key/" | |
Data |
| |
NextPage | Replace both "tags" and "categories" keys | |
PrevPage | Replace only "linkTitle" key | |
NextInSection | Replace both "tags" and "categories" keys | |
PrevInSection | Replace only "linkTitle" key |
Page Params (Debug)
Key | Type | Value |
---|---|---|
cats | []string | "test-cat-x" |
draft | bool | false |
iscjklanguage | bool | false |
lastmod | time.Time | 2022-05-03 00:48:15 -0400 -0400 |
tags | []string | "front-matter" "keys" "replace" "categories" |
title | string | " Replace only \"categories\" key\n " |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "e215bb52a5e75cb718e23d0e26f1d2bd" |
BaseFileName | "replace-only-categories-key" |
TranslationBaseName | "replace-only-categories-key" |
Lang | "en" |
Section | "posts" |
LogicalName | "replace-only-categories-key.md" |
Dir | "posts/" |
Ext | "md" |
Path | "posts/replace-only-categories-key.md" |