Skip to content

Commit 8d55838

Browse files
authored
fix: HTML not rendered #413
Problem: HTML in markdown pages is not rendered (e.g. `content/screenshots.md`). WARN Raw HTML omitted while rendering "/…/content/posts/2015-04-03-newsletter.md"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe You can suppress this warning by adding the following to your site configuration: ignoreLogs = ['warning-goldmark-raw-html'] Solution: We fully control the content and want to render HTML, so enable `unsafe=true`.
1 parent a9abffe commit 8d55838

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

content/posts/2022-12-31-newsletter.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Eye candy first!
5656
5757
- [Summary](https://www.vikasraj.dev/blog/lsp-neovim-retrospective) of the history and status of Nvim builtin LSP support.
5858
- Nvim LSP client now [supports](https://github.com/neovim/neovim/pull/19916) connecting to language servers by TCP.
59-
```
59+
```lua
6060
vim.lsp.start({ name = 'godot', cmd = vim.lsp.rpc.connect('127.0.0.1', 6008) })
6161
```
6262
- New [core events for LSP](https://github.com/neovim/neovim/pull/18507): `LspAttach`, `LspDetach`. Example:
63-
```
63+
```lua
6464
vim.api.nvim_create_autocmd('LspAttach', {
6565
group = yourGroupID,
6666
callback = function(args)
@@ -70,7 +70,7 @@ Eye candy first!
7070
}
7171
```
7272
- `vim.lsp.get_active_clients()` learned to filter (this will be a standard pattern in the Lua stdlib):
73-
```
73+
```lua
7474
get_active_clients({id=42})
7575
get_active_clients({bufnr=99})
7676
get_active_clients({name='tsserver'})
@@ -87,15 +87,15 @@ Eye candy first!
8787
- ![](/images/2023/3_1589419182713602048.jpg)
8888
- Nvim supports [editorconfig](https://editorconfig.org), and [enables it](https://github.com/neovim/neovim/pull/21633) by default. Nvim detects ".editorconfig" files in your project and applies the settings.
8989
- To opt-out of this feature, add this to your config:
90-
```
90+
```lua
9191
vim.g.editorconfig_enable = false
9292
```
9393
- Plugins can provide a [live preview](https://neovim.io/doc/user/map.html#%3Acommand-preview) of user-defined commands.
9494
- This extends the builtin `'inccommand'` feature (since 2017), which show the effects of `:substitute` (`:s/foo/bar`) as you type.
9595
- Example: The [live-command.nvim](https://github.com/smjonas/live-command.nvim) plugin adds preview for `:normal` and macros:
9696
- <video height="360" controls><source src="/images/2023/normal-cmd-preview_a84638.mp4" type="video/mp4"></video>
9797
- You [can now](https://github.com/neovim/neovim/pull/18194) implement ['inccommand'](https://neovim.io/doc/user/options.html#'inccommand') preview for any user-defined command. This builds a foundation for live preview of `:normal`, [:global](https://github.com/neovim/neovim/pull/18815), etc.
98-
```
98+
```lua
9999
vim.api.nvim_create_user_command(
100100
'MyCmd',
101101
my_cmd,
@@ -145,7 +145,7 @@ Eye candy first!
145145
## API
146146

147147
- [nvim_parse_cmd()](https://github.com/neovim/neovim/pull/18231) provides the foundation for `nvim_cmd([list])` and "user cmd-preview"! And super useful for defining custom cmdline (`:`) behavior.
148-
```
148+
```lua
149149
:echo nvim_parse_cmd('.,$g/foo/bar', {})
150150
{
151151
'cmd': 'global',
@@ -156,7 +156,7 @@ Eye candy first!
156156
```
157157
- Use `nvim_cmd()` to call any Vim legacy command in a structured way, like `system([...])`.
158158
- Don't need `fnameescape()`: special chars are controlled by the `magic` param.
159-
```
159+
```lua
160160
nvim_cmd({cmd='vimgrep', args={'/%s/j', '**'}}, {})
161161
```
162162
- [nvim-oxi](https://github.com/noib3/nvim-oxi): "first-class Rust bindings (FFI to Nvim C) to the rich API exposed by Neovim."
@@ -166,7 +166,7 @@ Eye candy first!
166166
- Check out the [vim.fs](https://neovim.io/doc/user/lua.html#vim.fs) module for filesystem operations.
167167
- `vim.fs.find()` is now the canonical way to find "root files", common for LSP configuration.
168168
- `vim.cmd` is the Lua `nvim_cmd` wrapper. It supports calling Ex commands as functions instead of strings:
169-
```
169+
```lua
170170
vim.cmd.colorscheme('nightfox')
171171
```
172172
- Lua plugins [continue to mature](https://zignar.net/2022/11/06/structuring-neovim-lua-plugins/):

hugo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ title = 'Neovim'
2424
url = "/news"
2525

2626
[markup]
27-
# [markup.goldmark]
28-
# [markup.goldmark.renderer]
29-
# unsafe = true
27+
[markup.goldmark]
28+
[markup.goldmark.renderer]
29+
unsafe = true
3030

3131
# XXX: somehow this accidentally enables use of the Neovim palette (css/neovim-hi.css),
3232
# presumably those css classes match whatever Hugo is using to provide syntax highlighting.

0 commit comments

Comments
 (0)