Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/markup
AgeCommit message (Collapse)Author
2021-07-15markup: Add tabindex="0" to default <pre> wrapperrhymes
Currently the generated `<pre>` element isn't fully accessible as it can't be focused by keyboard users. To make this fully accessible, the attribute `tabindex="0"` should be added to the `<pre>` tag. Closes #7194
2021-07-15markup/goldmark: Rename/reorder the hook methodsBjørn Erik Pedersen
To make them easier to follow. See #8755
2021-07-15markup/goldmark: Support auto links in render hookBjørn Erik Pedersen
Fixes #8755
2021-06-19markup: Rename Header(s) to Heading(s) in ToC structBjørn Erik Pedersen
Because that is what it is.
2021-06-14Misc config loading fixesBjørn Erik Pedersen
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster: ``` BenchmarkDefaultConfigProvider/Viper-16 252418 4546 ns/op 2720 B/op 30 allocs/op BenchmarkDefaultConfigProvider/Custom-16 450756 2651 ns/op 1008 B/op 6 allocs/op ``` Fixes #8633 Fixes #8618 Fixes #8630 Updates #8591 Closes #6680 Closes #5192
2021-04-12org: Disable broken pretty relative links featureNiklas Fasching
go-org PrettyRelativeLinks rewrites relative org links by - adding `../` in front - removing any `.org` suffix This was meant to play well with hugo pretty urls (which pretty much renders posts in a subdirectory without the file suffix) and allow use of normal org file links to reference other posts. There's a lot of edge cases I didn't consider and multiple bug reports in go-org [1] later I don't think the complexity of handling those edge cases is worth it - so let's disable it. [1] - https://github.com/niklasfasching/go-org/issues/53 - https://github.com/niklasfasching/go-org/commit/5dadf8c4c2924cbb3b93be45f96e1147596ca6f2 (comment) - https://github.com/niklasfasching/go-org/issues/51
2021-03-20Attributes for code fences should be placed after the lang indicator onlyBjørn Erik Pedersen
Fixes #8313
2021-03-09Fix output format handling for render hooksBjørn Erik Pedersen
Fixes #8176
2021-02-24markup: Handle attribute lists in code fencesBjørn Erik Pedersen
Fixes #8278
2021-02-23Allow markdown attribute lists to be used in title render hooksBjørn Erik Pedersen
Fixes #8270
2021-02-22Fixes #7698.gzagatti
markup: Allow installed arbitrary Asciidoc extension via path validation.
2021-02-09markup/goldmark: Fix handling of legacy attribute configBjørn Erik Pedersen
See #7548
2021-02-08markup/goldmark: Add attributes support for blocks (tables etc.)Bjørn Erik Pedersen
E.g.: ``` > foo > bar {.myclass} ``` There are some current limitations: For tables you can currently only apply it to the full table, and for lists the ul/ol-nodes only, e.g.: ``` * Fruit * Apple * Orange * Banana {.fruits} * Dairy * Milk * Cheese {.dairies} {.list} ``` Fixes #7548
2021-01-03deps: Update go-org to v1.4.0Niklas Fasching
- Add support for pretty urls [1]. Rewrite file links: 1. replace the `.org` extension with `/` (`/foo.org` -> `/foo/`) 2. prefix unrooted links with `../` as relative links start in the fake subdirectory `/foo/` rather than `/` - Fix case-sensitivity of org drawer `:end:` [1] https://gohugo.io/content-management/urls/#pretty-urls
2021-01-01rst: Adjust log levelBjørn Erik Pedersen
2020-12-30Add Dart Sass supportBjørn Erik Pedersen
But note that the Dart Sass Embedded Protocol is still in beta (beta 5), a main release scheduled for Q1 2021. Fixes #7380 Fixes #8102
2020-12-19Improve LookPathBjørn Erik Pedersen
2020-12-16all: Fix minor typosPhil Davis
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2020-11-26Fix server rebuild issue with partials referenced from render hooksBjørn Erik Pedersen
Fixes #7990
2020-11-20deps: Update to Chroma v0.8.2Bjørn Erik Pedersen
Closes #7970
2020-10-22Allow getJSON errors to be ignoredBjørn Erik Pedersen
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
2020-10-16highlight: Avoid making unnecessary allocationCameron Moore
Avoid creating a local copy of the highlight configuration when no options are passed. Benchmarks of building the docs site: name old time/op new time/op delta DocsSite-2 1.94s ± 4% 1.93s ± 4% ~ (p=0.841 n=5+5) name old alloc/op new alloc/op delta DocsSite-2 666MB ± 1% 656MB ± 0% -1.48% (p=0.008 n=5+5) name old allocs/op new allocs/op delta DocsSite-2 8.85M ± 0% 8.76M ± 0% -1.04% (p=0.029 n=4+4)
2020-09-17markup/asciidocext: Add preserveTOC optionHelder Pereira
2020-09-13markup/highlight: Add support to linkable line anchors on ChromaFernando Jorge Mota
Fixes #7622
2020-09-11deps: Update to Goldmark v1.2.1Bjørn Erik Pedersen
2020-09-10markup/asciidocext: Fix AsciiDoc TOC with codeHelder Pereira
Fixes #7649
2020-09-08markup/asciidocext: Fix broken testBjørn Erik Pedersen
2020-09-07markup/asciidocext: Revert trace=trueBjørn Erik Pedersen
2020-09-06markup/asciidoc: Add support for .TableOfContentsNicolas Piganeau
Fill the .TableOfContents template variable when writing Asciidoc content. This is done by letting Asciidoc render its TOC as HTML, then extract this HTML rendered TOC, parse it into a tableofcontents.Root and finally remove it from the HTML content. This aims to stay in the logic that the Asciidoc parsing is entirely done by the external helper. See #1687
2020-09-04markup/goldmark: Add a test caseBjørn Erik Pedersen
Updates #7619
2020-08-20Fixed misspelled wordsAurken Bilbao
2020-07-23Fix Asciidoctor argsHelder Pereira
* Fix Asciidoctor args * Fix Asciidoctor args documentation * Update AsciiDoc documentation Co-authored-by: Derk Muenchhausen <derk@muenchhausen.de> Fixes #7493
2020-07-05Remove trailing hyphen from auto heading IDJoe Mooring
Applicable when autoHeadingIDType is either `github` or `github-ascii`. When autoHeadingIDType is `blackfriday`, the existing code removes trailing whitespace while iterating through the characters, using a boolean "futureDash" mechanism. Fixes #6798
2020-07-02Update config.go to add two Asciidoctor extensionsBryan Klein
Added two common extensions to allow my Hugo+Asciidoctor site to build with the new configuration.
2020-06-27deps: Update go-org to v1.2.0Niklas Fasching
- Add support for #+MACRO - fix a bug with #+LINK (edge case, should never happen anyways :TM:) - Make title export optional (add export option) - Remove cosmetic whitespace added by go-org (for easier visual diffing) inside p tags (<p>\nfoo\n</p> => <p>foo</p>) (should make `white-space: pre` on p look more in line with expectations) - implement table separators via multiple tbodies (the html spec is ok with that)
2020-06-25Rework external asciidoctor integration Derk Muenchhausen
This commit solves the relative path problem with asciidoctor tooling. An include will resolve relatively, so you can refer easily to files in the same folder. Also `asciidoctor-diagram` and PlantUML rendering works now, because the created temporary files will be placed in the correct folder. This patch covers just the Ruby version of asciidoctor. The old AsciiDoc CLI EOLs in Jan 2020, so this variant is removed from code. The configuration is completely rewritten and now available in `config.toml` under the key `[markup.asciidocext]`: ```toml [markup.asciidocext] extensions = ["asciidoctor-html5s", "asciidoctor-diagram"] workingFolderCurrent = true trace = true [markup.asciidocext.attributes] my-base-url = "https://example.com/" my-attribute-name = "my value" ``` - backends, safe-modes, and extensions are now whitelisted to the popular (ruby) extensions and valid values. - the default for extensions is to not enable any, because they're all external dependencies so the build would break if the user didn't install them beforehand. - the default backend is html5 because html5s is an external gem dependency. - the default safe-mode is safe, explanations of the modes: https://asciidoctor.org/man/asciidoctor/ - the config is namespaced under asciidocext_config and the parser looks at asciidocext to allow a future native Go asciidoc. - `uglyUrls=true` option and `--source` flag are supported - `--destination` flag is required Follow the updated documentation under `docs/content/en/content-management/formats.md`. This patch would be a breaking change, because you need to correct all your absolute include pathes to relative paths, so using relative paths must be configured explicitly by setting `workingFolderCurrent = true`.
2020-05-15Add render template hooks for headingsEli W. Hunter
This commit also * Renames previous types to be non-specific. (e.g. hookedRenderer rather than linkRenderer) Resolves #6713
2020-04-17deps: Update go-org to v1.1.0Niklas Fasching
- inline source blocks and exports - result blocks and source block :exports parameter - fix: html escaping in example blocks - #+LINK based links
2020-03-20Some minify configuration adjustmentsBjørn Erik Pedersen
2020-03-20Add minify configSatowTakeshi
Fixes #6750 Updates #6892
2020-03-19Update to goldmark 1.1.25.Elliott Sales de Andrade
This fixes a bug, so there's a small change to tests.
2020-02-22Fix goldmark toc renderingsatotake
Previously gordmark-based TOC renderes only `KindText` and `KindString` This commit expands target node with Goldmark's renderer I am not sure of what are expected results as TOC contents in some (rare) cases but Blackfriday's behaviours are fundamentally respected. For example, - image `[image text](link)` is rendered as `<img>` tag - GFM AutoLink `gohugo.io` is rendered as text * Render AutoLink as <a> tag as Blackfriday does Fixes #6736 Fixes #6809
2020-02-18Fix RenderString for pages without contentBjørn Erik Pedersen
Fixes #6882
2020-02-17markup/highlight: Fix chroma highlightsatotake
* Use chroma.Coalesce * Escape code strings if lexer is nil Fixes #6877 Fixes #6856
2020-01-15deps: Update Goldmark to v1.1.21Matt Riggott
This is the first version of Goldmark that supports all the Smartypants-style typographic punctuation transformations. Now, a straight single quote in the middle of a word is translated into a curly quote (e.g. "that's" becomes "that&rsquo;s"). Earlier versions leave them untouched. This brings Goldmark in line with Blackfriday. Fixes #6571.
2020-01-05markup/goldmark: Adjust auto ID space handlingBjørn Erik Pedersen
GitHub does not consider tabs as delimiter, see https://github.com/bep/portable-hugo-links/blob/master/blog/p2.md Closes #6710
2020-01-05markup/goldmark: Add an optional Blackfriday auto ID strategyBjørn Erik Pedersen
Fixes #6707
2020-01-05markup/goldmark: Make the autoID type config a stringBjørn Erik Pedersen
To potentially make room for one more. See #6707
2020-01-05markup/goldmark: Simplify codeBjørn Erik Pedersen