-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add directory based archetypes #4535
Comments
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugoDocs
that referenced
this issue
Sep 19, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 19, 2018
This was referenced Sep 20, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 23, 2018
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 gohugoio#4535
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 23, 2018
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 gohugoio#4535
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 23, 2018
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 gohugoio#4535
bep
added a commit
that referenced
this issue
Sep 23, 2018
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
bep
added a commit
that referenced
this issue
Sep 24, 2018
bep
added a commit
to gohugoio/hugoDocs
that referenced
this issue
Sep 24, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, if you organize your content into bundles, you would have to do something like this to create new content with the archetype system:
This works as expected, but the added power of bundles with its resource handling (image processing etc.) is screaming for some better support in this department.
This issue suggests that we add support for complete directories below
/archetypes
. These will be used as a base to create a new bundle (or whatever).Given this content:
Will create a new folder in
/content/post/my-post
with the same set of files as in thepost-bundle
archetypes folder.The handling is simple:
The above example uses the
--kind
flag. This should also work without it, we just have to decide "who should win" on conflicts with the file based variant.See https://discourse.gohugo.io/t/archetypal-bundles/11195
The text was updated successfully, but these errors were encountered: