Pkg docs: consistent home dir; show build.jl contents (#28932)
* Update index.md
In the "adding a build step" section of "Creating your own packages", the output of the build step is shown, but the contents of `build.jl` are not shown. This is where the file is first described so I've added an example which should give the output shown.
* remove trailing whitespace
make check-whitespace caught an extra space in the first line of the
change. This has been removed.
Signed-off-by: Ian Allison <iana@pims.math.ca>
* Make the homedir used consistent throughout example
The first path given in the DEPOT_PATH is `/users/me/.julia`, but when
the search paths are expanded later in the example `/home/me/.julia` is
used instead.
Signed-off-by: Ian Allison <iana@pims.math.ca>