Commit Graph

9 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen d90e37e0c6 all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Chris Trimble 8a89b8582f commands: Fix jekyll metadata import on individual posts
Prior refactor had eliminated writing FrontMatter for Jekyll imports. This
fixes that bug as well as adds a regression test.

Also removed unused site var, replaced some raw strings, and added regression
test for \r\n removal.

Fixes #5576
2019-11-25 09:46:44 +01:00
Bjørn Erik Pedersen 9e57182705
tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
Jean-François YUEN ab9214768d importer: fix jekyll import highlight options 2018-12-12 19:12:12 +01:00
Colin Seymour 3752348ef1 Only set 'url' if permalink in metadata and remove duplicate confirm msg
The current behaviour addes a `url` attribute to the frontmatter of all posts imported from Jeklly and assumes the desired permalink structure is /:year/:month/:day/:title/. This may be the case for most peeps, but poses a problem for those that don't use this permalink structure as the `url` attribute takes precedence over the `permalink` attribute in the site-wide configuration meaning it can't be overruled.

This changes the behaviour to only set the `url` attribute if the `permalink` attribute is set in the Jekyll frontmatter.

The duplication of the confirmation message is also removed.

Tests have been updated to reflect this change in behaviour.

Fixes #1887
2018-01-28 11:24:31 +01:00
Stefan Buynov 5f3ad1c319 commands: Import Octopress image tag in Jekyll importer 2017-04-22 22:35:52 +02:00
Stefan Buynov 9dfb9c1445 Case insensitive translation of the 'more' tag when importing from Jekyll 2017-03-18 16:16:25 +01:00
Bjørn Erik Pedersen e445c35d6a Fix copyright headers in source files
Still need to add some missing headers and an AUTHORS file.

See #1646
2015-12-07 19:57:01 +01:00
Anthony Fok 75c61236f1 Move `import jekyll` functions to import_jekyll.go
Also rename import_test.go to import_jekyll_test.go
2015-12-02 03:39:10 -07:00