Skip to content

Conversation

@enderseven1
Copy link
Contributor

@enderseven1 enderseven1 commented Mar 12, 2025

English

I add a key has-menu and time_format. If you need insert a time when this website builds, you can use tag {#buildtime}.
You must set "has_symbol": true before use it.

Like this (in config.json):

{
    "locale": "en",
    "navbar": {
        "items": [
            {
                "label": "Last Build: {#buildtime}",
                "position": "right",
                "has_symbol": true
            }
        ]
    }
}

It will display Last Build: 2025-03-12 dd:mm:ss at right of top bar.
Default value of time_format key is %Y-%m-%d %X, it's for Chinese. If you want to set another format, please set it, for example %a %b %d %H:%M:%S %Y, then it will show Wed Mar 12 dd:mm:ss 2025.

Now, if a label without url on top bar and set its type to link, it won't be a <a></a> link button, it will become a text label.

If you need more tag like {#xxxxx}, please tell me.

中文

我添加了has-menutime_format键,需要插入构建时间时使用{#buildtime}
你必须设置"has_symbol": true来启用。

例如 (在config.json):

{
    "locale": "zh",
    "navbar": {
        "items": [
            {
                "label": "上次构建:{#buildtime}",
                "position": "right",
                "has_symbol": true
            }
        ]
    }
}

将在标题栏右侧显示 上次构建:2025-03-12 时时:分分:秒秒
time_format 的默认值为 %Y-%m-%d %X。若要更改请设置此键,如%a %b %d %H:%M:%S %Y,将显示Wed Mar 12 dd:mm:ss 2025

现在标题栏的标签如果没有url键并且设置typelink,将不会生成<a></a>的超链接按钮,而是普通标签。

如果需要更多类似{#xxxxx}的标签请提出。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant