stk-legacy add template
Description
The stk-legacy add template
command is used to add Templates to the Stacks already created by the stk-legacy create stack
command.
How does it work?
The command must always run inside a folder created by the stk-legacy create stack
command. It can take as a parameter the Git's repository URL for a Plugin or a path to a folder for a Template created by the stk-legacy create template
command.
When using a Git repository URL, the Template will be added to the Stack as a submodule of the Stack, i.e., it will have its own Git repository. In this case, the same Template can be added to more than one Stack and updates are made to the Template repository. They will be reflected automatically in all Stacks where the Template has been added.
When using a path to a Template folder the Template source code is copied into the Stack repository and becomes part of the Stack as if it was created directly in the Stack folder with the `stk-legacy create plugin`` command. Using this option there is no way to reflect the Template update in more than one Stack.
Use this option if you want to convert a Template that was created as a submodule to a Template that will not be shared between Stacks.
You must run the following commands inside the Stack folder:
stk-legacy add template <template-repo-url> or <path-to-folder-of-template>
for each Template you need to add to Stack.push -u origin main
You don't need to use the stk-legacy add template
command if the Template has been created inside the Stack folder.
Parameters
Check the available options in the command:
Parameter | Description |
---|---|
REPO_URL_OR_PATH | Defines Git's repository URL or folder path of a Template when added to a Stack. |
Example
After creating your Stack, you can add Templates, see the example below:
Read more
Was this page helpful?