Shugabuga / Silica

A static site generator for MobileAPT repos.
https://silica.shuga.co/
Other
160 stars 39 forks source link

Changelog #12

Closed willbraffman closed 4 years ago

willbraffman commented 5 years ago

The changelog will not work. Below I have included one of my index.json that I have been adding to, even tho it will not show. I have also included the .json file for the corresponding tweak from the docs folder. If you need more just let me know. Thanks in advance!! com.willbraff.historyofios.json.zip

index.json.zip

absidue commented 5 years ago

You need to use correct json to get the changelog to work. At the moment you have a dictionary as the changelog, but you should have an array of dictionaries. What you have:

"changelog": {
    "version": "1.1",
    "changes": "fix",
    "version": "1.2",
    "changes": "added iOS 6 icons",
    "version": "1.2.1",
    "changes": "added classic extentions",
    "version": "1.3",
    "changes": "added docks",
    "version": "1.3.1",
    "changes": "fix docks",
    "version": "1.3.2",
    "changes": "fix docks iOS 10&Below",
    "version": "1.4",
    "changes": "added iOS 13 icons."
}

How it should be:

"changelog": [
    {
        "version": "1.1",
        "changes": "fix"
    },
    {
        "version": "1.2",
        "changes": "added iOS 6 icons"
    },
    {
        "version": "1.2.1",
        "changes": "added classic extentions"
    },
    {
        "version": "1.3",
        "changes": "added docks"
    },
    {
        "version": "1.3.1",
        "changes": "fix docks"
    },
    {
        "version": "1.3.2",
        "changes": "fix docks iOS 10&Below"
    },
    {
        "version": "1.4",
        "changes": "added iOS 13 icons."
    }
]
Shugabuga commented 5 years ago

@absidue Thank you for taking your time to find out the issue. I'm sorry I wasn't able to! 😦

@willbraffman As @absidue said, try making sure the changelog object is an array.

Using your file, change this...

"changelog": {
    "version": "1.4",
    "changes": "added iOS 13 icons."
  }

...to this...

"changelog": [
    {
        "version": "1.4",
        "changes": "added iOS 13 icons."
    }
]

If this doesn't work, let me know.

Sparoney commented 4 years ago

Hijacking this, is there a way to make the changelog multiline? Or a way to parse HTML code?

Shugabuga commented 4 years ago

As of now, no @sparoney.

Shugabuga commented 4 years ago

Closed due to inactivity. Feel free to re-open this if the posted solution doesn't work @willbraffman.

absidue commented 4 years ago

@Sparoney insert \n where you would like new lines; it works best with lists.

example: - Line 1\n- Line 2

outputs: