Skip to content

Commit 427fefd

Browse files
authored
Split PkgTemplates code blocks (#126)
1 parent cc9d397 commit 427fefd

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

sharing/index.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,17 @@ Do not insert any files like `README.md`, `.gitignore` or `LICENSE.md`, this wil
3333
Indeed, we can leverage [PkgTemplates.jl](https://github.com/JuliaCI/PkgTemplates.jl) to automate package creation (like `]generate` from Pkg.jl but on steroids).
3434
The following code gives you a basic file structure to start with:
3535

36-
```>pkgtemplates
36+
```>pkgtemplates1
3737
using PkgTemplates
38-
dir = Utils.path(:site) # replace with the folder of your choice
39-
t = Template(dir=dir, user="myuser", interactive=false);
38+
t = Template(user="myuser", interactive=false);
39+
```
40+
41+
```!pkgtemplates2
42+
#hideall
43+
t = Template(dir=Utils.path(:site), user="myuser", interactive=false);
44+
```
45+
46+
```>pkgtemplates3
4047
t("MyAwesomePackage")
4148
```
4249

@@ -45,12 +52,23 @@ The rest of this post will explain to you what each part of this folder does, an
4552

4653
To work on the package further, we develop it into the current environment and import it:
4754

48-
```>using-awesome
55+
```julia-repl
56+
julia> using Pkg
57+
58+
julia> Pkg.develop(path="MyAwesomePackage")
59+
```
60+
61+
```!using-awesome1
62+
#hideall
4963
using Pkg
5064
Pkg.develop(path=sitepath("MyAwesomePackage")) # ignore sitepath
65+
```
66+
67+
```>using-awesome2
5168
using MyAwesomePackage
5269
```
5370

71+
5472
## GitHub Actions
5573

5674
The most useful aspect of PkgTemplates.jl is that it automatically generates workflows for [GitHub Actions](https://docs.github.com/en/actions/quickstart).

0 commit comments

Comments
 (0)