summaryrefslogtreecommitdiffhomepage
path: root/commands/new.go
AgeCommit message (Collapse)Author
2018-11-18Fix ignored --config flag with 'new' commandKris Budhram
2018-10-15commands: Add help text to "hugo new"Elliot Forbes
2018-09-23Add directory based archetypesBjørn Erik Pedersen
Given this content: ```bash archetypes ├── default.md └── post-bundle ├── bio.md ├── images │   └── featured.jpg └── index.md ``` ```bash hugo new --kind post-bundle post/my-post ``` Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder. This commit also improves the archetype language detection, so, if you use template code in your content files, the `.Site` you get is for the correct language. This also means that it is now possible to translate strings defined in the `i18n` bundles, e.g. `{{ i18n "hello" }}`. Fixes #4535
2018-06-11commands: Move nextStepsText() to new_site.goAnthony Fok
2018-06-10Add support for theme composition and inheritanceBjørn Erik Pedersen
This commit adds support for theme composition and inheritance in Hugo. With this, it helps thinking about a theme as a set of ordered components: ```toml theme = ["my-shortcodes", "base-theme", "hyde"] ``` The theme definition example above in `config.toml` creates a theme with the 3 components with presedence from left to right. So, Hugo will, for any given file, data entry etc., look first in the project, and then in `my-shortcode`, `base-theme` and lastly `hyde`. Hugo uses two different algorithms to merge the filesystems, depending on the file type: * For `i18n` and `data` files, Hugo merges deeply using the translation id and data key inside the files. * For `static`, `layouts` (templates) and `archetypes` files, these are merged on file level. So the left-most file will be chosen. The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are plans to improve on this and get a URL scheme so this can be resolved automatically. Also note that a component that is part of a theme can have its own configuration file, e.g. `config.toml`. There are currently some restrictions to what a theme component can configure: * `params` (global and per language) * `menu` (global and per language) * `outputformats` and `mediatypes` The same rules apply here: The left-most param/menu etc. with the same ID will win. There are some hidden and experimental namespace support in the above, which we will work to improve in the future, but theme authors are encouraged to create their own namespaces to avoid naming conflicts. A final note: Themes/components can also have a `theme` definition in their `config.toml` and similar, which is the "inheritance" part of this commit's title. This is currently not supported by the Hugo theme site. We will have to wait for some "auto dependency" feature to be implemented for that to happen, but this can be a powerful feature if you want to create your own theme-variant based on others. Fixes #4460 Fixes #4450
2018-04-11commands: Remove some TODOsBjørn Erik Pedersen
See #4598
2018-04-11commands: Remove the Hugo globalBjørn Erik Pedersen
There are still some cleaning to do, but that felt good. See #4598
2018-04-11commands: Add CLI testsBjørn Erik Pedersen
See #4598
2018-04-11commands: Make the hugo command non-globalBjørn Erik Pedersen
See #4598
2018-04-11commands: Make the new commands non-globalBjørn Erik Pedersen
See #4598
2018-04-09releaser: Prepare repository for 0.39-DEVhugoreleaser
[ci skip]
2018-04-09releaser: Bump versions for release of 0.38.2hugoreleaser
[ci skip]
2018-04-05releaser: Prepare repository for 0.39-DEVhugoreleaser
[ci skip]
2018-04-05releaser: Bump versions for release of 0.38.1hugoreleaser
[ci skip]
2018-04-02releaser: Bump versions for release of 0.38hugoreleaser
[ci skip]
2018-03-07releaser: Prepare repository for 0.38-DEVhugoreleaser
[ci skip]
2018-03-07releaser: Bump versions for release of 0.37.1hugoreleaser
[ci skip]
2018-02-27releaser: Bump versions for release of 0.37hugoreleaser
[ci skip]
2018-02-05releaser: Bump versions for release of 0.36hugoreleaser
[ci skip]
2018-01-31releaser: Bump versions for release of 0.35hugoreleaser
[ci skip]
2018-01-22releaser: Bump versions for release of 0.34hugoreleaser
[ci skip]
2018-01-18releaser: Bump versions for release of 0.33hugoreleaser
[ci skip]
2018-01-11releaser: Prepare repository for 0.33-DEVhugoreleaser
[ci skip]
2018-01-11releaser: Bump versions for release of 0.32.4hugoreleaser
[ci skip]
2018-01-08releaser: Prepare repository for 0.33-DEVhugoreleaser
[ci skip]
2018-01-08releaser: Bump versions for release of 0.32.3hugoreleaser
[ci skip]
2018-01-03releaser: Prepare repository for 0.33-DEVhugoreleaser
[ci skip]
2018-01-03releaser: Bump versions for release of 0.32.2hugoreleaser
[ci skip]
2018-01-02releaser: Prepare repository for 0.33-DEVhugoreleaser
[ci skip]
2018-01-02releaser: Bump versions for release of 0.32.1hugoreleaser
[ci skip]
2017-12-31releaser: Bump versions for release of 0.32hugoreleaser
[ci skip]
2017-12-27:sparkles: Implement Page bundling and image handlingBjø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-11-27releaser: Prepare repository for 0.32-DEVhugoreleaser
[ci skip]
2017-11-27releaser: Bump versions for release of 0.31.1hugoreleaser
[ci skip]
2017-11-20releaser: Bump versions for release of 0.31hugoreleaser
[ci skip]
2017-10-19releaser: Prepare repository for 0.31-DEVhugoreleaser
[ci skip]
2017-10-19releaser: Bump versions for release of 0.30.2hugoreleaser
[ci skip]
2017-10-19releaser: Prepare repository for 0.31-DEVhugoreleaser
[ci skip]
2017-10-19releaser: Bump versions for release of 0.30.1hugoreleaser
[ci skip]
2017-10-16releaser: Bump versions for release of 0.30hugoreleaser
[ci skip]
2017-09-26releaser: Bump versions for release of 0.29hugoreleaser
[ci skip]
2017-09-25releaser: Bump versions for release of 0.28hugoreleaser
[ci skip]
2017-09-13releaser: Prepare repository for 0.28-DEVhugoreleaser
[ci skip]
2017-09-13releaser: Bump versions for release of 0.27.1hugoreleaser
[ci skip]
2017-09-11releaser: Bump versions for release of 0.27hugoreleaser
[ci skip]
2017-08-07releaser: Bump versions for release of 0.26Bjørn Erik Pedersen
[ci skip]
2017-07-10Bump versions to 0.26-DEVBjørn Erik Pedersen
2017-07-10releaser: Prepare repository for 0.25-DEVBjørn Erik Pedersen
[ci skip]
2017-07-10releaser: Bump versions for release of 0.25.1Bjørn Erik Pedersen
[ci skip]
2017-07-07releaser: Bump versions for release of 0.25Bjørn Erik Pedersen
[ci skip]