1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 04:29:47 +00:00

doc update doc

This commit is contained in:
deadc0de6
2020-09-13 22:01:46 +02:00
parent d4051a4942
commit b024891af1
19 changed files with 990 additions and 1018 deletions

View File

@@ -2,15 +2,15 @@
## Append to a dotfile
[Append to a dotfile](howto/append.md)
[Append to a dotfile](append.md)
## Create special files
[Create special files](howto/create-special-files.md)
[Create special files](create-special-files.md)
## Handle special chars
[Handle special chars](howto/special-chars.md)
[Handle special chars](special-chars.md)
## Improve git integration
@@ -18,20 +18,20 @@
## Merge files on install
[Merge files on install](howto/merge-files-when-installing.md)
[Merge files on install](merge-files-when-installing.md)
## Share content across dotfiles
[Share content across dotfiles](howto/sharing-content.md)
[Share content across dotfiles](sharing-content.md)
## Store compressed directories
[Store compressed directories](howto/store-compressed-directories.md)
[Store compressed directories](store-compressed-directories.md)
## Store secrets
[Store secrets](howto/sensitive-dotfiles.md)
[Store secrets](sensitive-dotfiles.md)
## Symlink dotfiles
[Symlink dotfiles](howto/symlinked-dotfiles.md)
[Symlink dotfiles](symlinked-dotfiles.md)

View File

@@ -1,6 +1,6 @@
Sometimes it might be useful to be able to append some text to a
Sometimes it might be useful to be able to append some text to a
file. Dotdrop is able to do that with the help of
[actions](https://github.com/deadc0de6/dotdrop/wiki/usage-actions)
[actions](../config.md#actions).
and a temporary file.
Below is a config example to append to a file:
@@ -18,7 +18,7 @@ dotfiles:
- append "{{@@ tmpfile @@}}" "{{@@ somefile_final @@}}"
actions:
pre:
strip: "sed -i '/^# my pattern$/,$d' {0}"
strip: "sed -i '/^# my pattern$/,$d' {0}"
post:
append: "cat {0} >> {1}; rm -f {0}"
```
@@ -28,4 +28,4 @@ Obviously the dotfile in the dotpath should start with a unique pattern (here `#
```
# my pattern
this is the end
```
```

View File

@@ -1,5 +1,5 @@
One way for creating symlinks (or any other special files) is to use a combination of
[actions](../config/usage-actions.md) and a *fake* dotfile.
[actions](../config.md#actions) and a *fake* dotfile.
Let's say for example you have a list of directories you want to link
from under `~/.original` to `~/symlinks`.

View File

@@ -46,12 +46,12 @@ Dotdrop will then automagically include the files into your vimrc when handling
# Merge all files in a directory
To include all files in a directory, a combination of
[dynvariables](../config/config-variables.md#interpreted-variables-entry)
[dynvariables](../config.md#interpreted-variables)
and [jinja2 directives](http://jinja.pocoo.org/docs/2.10/) have to be used.
Let's say all files in `<dotpath>/toinclude` need to be included into a dotfile.
First define a [dynvariables](../config/config-variables.md#interpreted-variables-entry)
First define a [dynvariables](../config.md#interpreted-variables)
in the config file which will look for files to include in the above directory:
```yaml
dynvariables:
@@ -59,7 +59,7 @@ dynvariables:
```
Note that `_dotdrop_dotpath` is part of the built-in variables
(for more see [template variables](../template/templating.md#template-variables)).
(for more see [template variables](../templating.md#template-variables)).
And then use the generated list in the dotfile template:
```

View File

@@ -8,7 +8,7 @@
# Available solutions
Two solutions exist, the first one using an unversioned file (see [Environment variables](../template/templating.md#environment-variables))
Two solutions exist, the first one using an unversioned file (see [Environment variables](../templating.md#environment-variables))
and the second using transformations (see [Store encrypted dotfiles](#store-encrypted-dotfiles)).
# Store encrypted dotfiles

View File

@@ -64,7 +64,7 @@ export DB_PORT='4521'
Albeit flexible, the previous method is a bit cumbersome for some use cases.
For example, when the dotfiles belong to different profiles, the cleanest
solution consists in using
[profile variables](../config/config-variables.md#profile-variables). This is achieved by:
[profile variables](../config.md#profile-variables). This is achieved by:
1. Creating the merged dotfile with an arbitrary name somewhere in `dotpath`.
2. Adding some variables in the merged dotfile via templating.

View File

@@ -85,10 +85,10 @@ $ tree -L 1 ~/.vim
# Templating symlinked dotfiles
For dotfiles not using any templating directives, those are directly linked
to dotdrop's `dotpath` directory (see [Config](../config/config.md)).
to dotdrop's `dotpath` directory (see [Config](../config.md)).
When using templating directives however the dotfiles are first installed into
`workdir` (defaults to *~/.config/dotdrop*, see [Config](../config/config.md))
`workdir` (defaults to *~/.config/dotdrop*, see [Config](../config.md))
and then symlinked there.
This applies to both dotfiles with `link: link` and `link: link_children`.