From 6c5b7a3f4cc409e31739b2914bb6636d08299126 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Wed, 10 Dec 2025 09:44:00 +0000 Subject: [PATCH 1/3] Update docs --- docs/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 174de834d..b3ac57a2f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -149,14 +149,14 @@ pages: columns: - size: full widgets: - $include: rss.yml + - $include: rss.yml - name: News columns: - size: full widgets: - type: group widgets: - $include: rss.yml + - $include: rss.yml - type: reddit subreddit: news ``` From 175de5bcdd01826e989a03e2936aa4a7fc579d29 Mon Sep 17 00:00:00 2001 From: Joe Walter Date: Sat, 21 Feb 2026 09:26:23 -0500 Subject: [PATCH 2/3] create market parameter for markets widget --- docs/configuration.md | 11 +++++++++-- internal/glance/widget-markets.go | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index b3ac57a2f..cf38ed9b9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2784,8 +2784,10 @@ Example: name: Bitcoin chart-link: https://www.tradingview.com/chart/?symbol=INDEX:BTCUSD - symbol: NVDA + market: NASDAQ name: NVIDIA - symbol: AAPL + market: NASDAQ symbol-link: https://www.google.com/search?tbm=nws&q=apple name: Apple ``` @@ -2810,14 +2812,14 @@ An array of markets for which to display information about. By default the markets are displayed in the order they were defined. You can customize their ordering by setting the `sort-by` property to `change` for descending order based on the stock's percentage change (e.g. 1% would be sorted higher than -1%) or `absolute-change` for descending order based on the stock's absolute price change (e.g. -1% would be sorted higher than +0.5%). ##### `chart-link-template` -A template for the link to go to when clicking on the chart that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market. You can override this on a per-market basis by specifying a `chart-link` property. Example: +A template for the link to go to when clicking on the chart that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market, and `{MARKET}` will be replaced with the market parameter. You can override this on a per-market basis by specifying a `chart-link` property. Example: ```yaml chart-link-template: https://www.tradingview.com/chart/?symbol={SYMBOL} ``` ##### `symbol-link-template` -A template for the link to go to when clicking on the symbol that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market. You can override this on a per-market basis by specifying a `symbol-link` property. Example: +A template for the link to go to when clicking on the symbol that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market, and `{MARKET}` will be replaced with the market parameter. You can override this on a per-market basis by specifying a `symbol-link` property. Example: ```yaml symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL} @@ -2827,6 +2829,7 @@ symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL} | Name | Type | Required | | ---- | ---- | -------- | | symbol | string | yes | +| market | string | no | | name | string | no | | symbol-link | string | no | | chart-link | string | no | @@ -2835,6 +2838,10 @@ symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL} The symbol, as seen in Yahoo Finance. +`market` + +The market the symbol belongs to, which can be used in `{MARKET}` replacements. + `name` The name that will be displayed under the symbol. diff --git a/internal/glance/widget-markets.go b/internal/glance/widget-markets.go index b53b10a11..f78b21c46 100644 --- a/internal/glance/widget-markets.go +++ b/internal/glance/widget-markets.go @@ -36,11 +36,13 @@ func (widget *marketsWidget) initialize() error { m := &widget.MarketRequests[i] if widget.ChartLinkTemplate != "" && m.ChartLink == "" { - m.ChartLink = strings.ReplaceAll(widget.ChartLinkTemplate, "{SYMBOL}", m.Symbol) + link := strings.ReplaceAll(widget.ChartLinkTemplate, "{SYMBOL}", m.Symbol) + m.ChartLink = strings.ReplaceAll(link, "{MARKET}", m.Market) } if widget.SymbolLinkTemplate != "" && m.SymbolLink == "" { - m.SymbolLink = strings.ReplaceAll(widget.SymbolLinkTemplate, "{SYMBOL}", m.Symbol) + link := strings.ReplaceAll(widget.SymbolLinkTemplate, "{SYMBOL}", m.Symbol) + m.SymbolLink = strings.ReplaceAll(link, "{MARKET}", m.Market) } } @@ -70,6 +72,7 @@ func (widget *marketsWidget) Render() template.HTML { type marketRequest struct { CustomName string `yaml:"name"` Symbol string `yaml:"symbol"` + Market string `yaml:"market"` ChartLink string `yaml:"chart-link"` SymbolLink string `yaml:"symbol-link"` } From 1acfb2ed69975e714354d9ca937526158a1946d9 Mon Sep 17 00:00:00 2001 From: Joe Walter Date: Sat, 21 Feb 2026 09:39:46 -0500 Subject: [PATCH 3/3] expand on docs for market tag --- docs/configuration.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index cf38ed9b9..8fc0d9b1f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2784,10 +2784,8 @@ Example: name: Bitcoin chart-link: https://www.tradingview.com/chart/?symbol=INDEX:BTCUSD - symbol: NVDA - market: NASDAQ name: NVIDIA - symbol: AAPL - market: NASDAQ symbol-link: https://www.google.com/search?tbm=nws&q=apple name: Apple ``` @@ -2815,22 +2813,22 @@ By default the markets are displayed in the order they were defined. You can cus A template for the link to go to when clicking on the chart that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market, and `{MARKET}` will be replaced with the market parameter. You can override this on a per-market basis by specifying a `chart-link` property. Example: ```yaml -chart-link-template: https://www.tradingview.com/chart/?symbol={SYMBOL} +chart-link-template: https://www.tradingview.com/chart/?symbol={SYMBOL}?market={MARKET} ``` ##### `symbol-link-template` A template for the link to go to when clicking on the symbol that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market, and `{MARKET}` will be replaced with the market parameter. You can override this on a per-market basis by specifying a `symbol-link` property. Example: ```yaml -symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL} +symbol-link-template: https://www.google.com/finance/beta/quote/{SYMBOL}:{MARKET} ``` ###### Properties for each market | Name | Type | Required | | ---- | ---- | -------- | | symbol | string | yes | -| market | string | no | | name | string | no | +| market | string | no | | symbol-link | string | no | | chart-link | string | no | @@ -2838,14 +2836,14 @@ symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL} The symbol, as seen in Yahoo Finance. -`market` - -The market the symbol belongs to, which can be used in `{MARKET}` replacements. - `name` The name that will be displayed under the symbol. +`market` + +The market the symbol belongs to, which can be used in `{MARKET}` replacements. + `symbol-link` The link to go to when clicking on the symbol.