github.com/anakojm/hugo-katex@v0.0.0-20231023141351-42d6f5de9c0b/testscripts/commands/convert.txt (about)

     1  # Test the convert commands.
     2  
     3  hugo convert -h
     4  stdout 'Convert your content'
     5  hugo convert toJSON -h
     6  stdout 'to use JSON for the front matter'
     7  hugo convert toTOML -h
     8  stdout 'to use TOML for the front matter'
     9  hugo convert toYAML -h
    10  stdout 'to use YAML for the front matter'
    11  
    12  hugo convert toJSON -o myjsoncontent
    13  stdout 'processing 3 content files'
    14  grep '^{' myjsoncontent/content/mytoml.md
    15  grep '^{' myjsoncontent/content/myjson.md
    16  grep '^{' myjsoncontent/content/myyaml.md
    17  hugo convert toYAML -o myyamlcontent
    18  stdout 'processing 3 content files'
    19  hugo convert toTOML -o mytomlcontent
    20  stdout 'processing 3 content files'
    21  
    22  
    23  
    24  
    25  
    26  -- hugo.toml --
    27  baseURL = "http://example.org/"
    28  -- content/mytoml.md --
    29  +++
    30  title = "TOML"
    31  +++
    32  TOML content
    33  -- content/myjson.md --
    34  {
    35    "title": "JSON"
    36  }
    37  JSON content
    38  -- content/myyaml.md --
    39  ---
    40  title: YAML
    41  ---
    42  YAML content