Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-03-23 | Make Page an interface | Bjørn Erik Pedersen | |
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct. This is all a preparation step for issue #5074, "pages from other data sources". But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes. Most notable changes: * The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday. This means that any markdown will partake in the global ToC and footnote context etc. * The Custom Output formats are now "fully virtualized". This removes many of the current limitations. * The taxonomy list type now has a reference to the `Page` object. This improves the taxonomy template `.Title` situation and make common template constructs much simpler. See #5074 Fixes #5763 Fixes #5758 Fixes #5090 Fixes #5204 Fixes #4695 Fixes #5607 Fixes #5707 Fixes #5719 Fixes #3113 Fixes #5706 Fixes #5767 Fixes #5723 Fixes #5769 Fixes #5770 Fixes #5771 Fixes #5759 Fixes #5776 Fixes #5777 Fixes #5778 | |||
2018-12-23 | Add CSV support to transform.Unmarshal | Bjørn Erik Pedersen | |
Fixes #5555 | |||
2018-12-12 | importer: fix jekyll import highlight options | Jean-François YUEN | |
2018-10-22 | Convert the rest to new page parser code paths | Bjørn Erik Pedersen | |
And remove some now unused code. See #5324 | |||
2018-10-22 | parser/metadecoders: Consolidate the metadata decoders | Bjørn Erik Pedersen | |
See #5324 | |||
2018-09-07 | commands: Fix golint issues | Cameron Moore | |
commands/hugo.go:65:1: exported method Response.IsUserError should have comment or be unexported commands/import_jekyll.go:100:21: error strings should not be capitalized or end with punctuation or a newline commands/server.go:417:1: receiver name sc should be consistent with previous receiver name s for serverCmd | |||
2018-04-11 | commands: Make the hugo command non-global | Bjørn Erik Pedersen | |
See #4598 | |||
2018-04-11 | commands: Make the import commands non-global | Bjørn Erik Pedersen | |
See #4598 | |||
2018-01-28 | Only set 'url' if permalink in metadata and remove duplicate confirm msg | Colin Seymour | |
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-26 | Support pages without front matter | Vas Sudanagunta | |
* Page without front matter now treated same as a page with empty front matter. * Test cases added to cover this and repro issue #4320. * Type safety of front matter code improved. Fixes #4320 | |||
2017-12-27 | :sparkles: Implement Page bundling and image handling | Bjørn Erik Pedersen | |
This commit is not the smallest in Hugo's history. Some hightlights include: * Page bundles (for complete articles, keeping images and content together etc.). * Bundled images can be processed in as many versions/sizes as you need with the three methods `Resize`, `Fill` and `Fit`. * Processed images are cached inside `resources/_gen/images` (default) in your project. * Symbolic links (both files and dirs) are now allowed anywhere inside /content * A new table based build summary * The "Total in nn ms" now reports the total including the handling of the files inside /static. So if it now reports more than you're used to, it is just **more real** and probably faster than before (see below). A site building benchmark run compared to `v0.31.1` shows that this should be slightly faster and use less memory: ```bash ▶ ./benchSite.sh "TOML,num_langs=.*,num_root_sections=5,num_pages=(500|1000),tags_per_page=5,shortcodes,render" benchmark old ns/op new ns/op delta BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 101785785 78067944 -23.30% BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 185481057 149159919 -19.58% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 103149918 85679409 -16.94% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 203515478 169208775 -16.86% benchmark old allocs new allocs delta BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 532464 391539 -26.47% BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 1056549 772702 -26.87% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 555974 406630 -26.86% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 1086545 789922 -27.30% benchmark old bytes new bytes delta BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 53243246 43598155 -18.12% BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 105811617 86087116 -18.64% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4 54558852 44545097 -18.35% BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4 106903858 86978413 -18.64% ``` Fixes #3651 Closes #3158 Fixes #1014 Closes #2021 Fixes #1240 Updates #3757 | |||
2017-07-01 | hugo import jekyll support nested _posts directories | coderzh | |
Fixes #1890 Closes #1911 | |||
2017-06-13 | Run gofmt to get imports in line vs gohugoio/hugo | Bjørn Erik Pedersen | |
2017-06-13 | all: Update import paths to gohugoio/hugo | Bjørn Erik Pedersen | |
2017-04-26 | commands: Make first letter of flags' usage lowercase | Albert Nigmatzianov | |
2017-04-22 | commands: Import Octopress image tag in Jekyll importer | Stefan Buynov | |
2017-03-18 | Case insensitive translation of the 'more' tag when importing from Jekyll | Stefan Buynov | |
2017-03-13 | commands: Improve jekyll import date format | Anthony Kong | |
Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown file names. | |||
2017-03-11 | parser: Refactor frontmatter parser and add tests | Cameron Moore | |
Lots of cleanups here: - Refactor InterfaceToConfig and InterfaceToFrontMatter to use io.Writer. - Simplify InterfaceToFrontMatter by wrapping InterfaceToConfig. - Export FrontmatterType since we return it in DetectFrontMatter. - Refactor removeTOMLIdentifier to avoid blindly replacing "+++". - Update HandleJSONMetaData to return an empty map on nil input. - Updates vendored goorgeous package and test for org-mode frontmatter. - Add tests and godoc comments. Coverage for parser package increased from 45.2% to 85.2%. | |||
2017-02-04 | all: Refactor to nonglobal file systems | Bjørn Erik Pedersen | |
Updates #2701 Fixes #2951 | |||
2017-01-07 | all: Refactor to non-global logger | Bjørn Erik Pedersen | |
Note that this looks like overkill for just the logger, and that is correct, but this will make sense once we start with the template handling etc. Updates #2701 | |||
2017-01-05 | commands, vendor: Remove log level setting in Jekyll command | Bjørn Erik Pedersen | |
And update the JWW lib. | |||
2016-11-22 | all: Use jww instead of fmt for printing | bogem | |
This is an attempt to unify method for printing. | |||
2016-10-24 | all: Unify case of config variable names | Albert Nigmatzianov | |
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI. | |||
2016-10-14 | Use example.org for replace-this-with-your-hugo-site.com | Bjørn Erik Pedersen | |
Fixes #2575 | |||
2016-09-11 | Fixe target path location check in jekyll import command | Jelmer Tiete | |
2016-03-31 | Add readFile template func | Bjørn Erik Pedersen | |
This also includes a refactor of the hugofs package and its usage. The motivation for that is: The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...) Fixes #1551 | |||
2016-03-24 | commands: Apply Golint rules | digitalcraftsman | |
2016-03-22 | commands: Do not use named return vals in Jekyll import | Bjørn Erik Pedersen | |
2016-03-22 | source: Remove unnecessary else condition | srinivasreddy | |
2016-03-21 | Add support for symbolic links for content, layout, static, theme | Bjørn Erik Pedersen | |
Note: This is for the content roots only, but that should satisfy most needs. Fixes #1855 | |||
2015-12-14 | Do not fail on unknown Jekyll file | Bjørn Erik Pedersen | |
Fixes #1705 | |||
2015-12-07 | Fix copyright headers in source files | Bjørn Erik Pedersen | |
Still need to add some missing headers and an AUTHORS file. See #1646 | |||
2015-12-03 | Add sanity checks for `hugo import jekyll` | Anthony Fok | |
Also add `--force` flag copied from `hugo new site`. Fixes #1625 | |||
2015-12-02 | Improve error handling in commands | Bjørn Erik Pedersen | |
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department. This enables a more centralized error handling approach. This commit introduces that by changing all the command funcs to `RunE`: * The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only. * The usage text is now only shown on invalid arguments etc. (user errors) Fixes #1502 | |||
2015-12-02 | Move `import jekyll` functions to import_jekyll.go | Anthony Fok | |
Also rename import_test.go to import_jekyll_test.go |