]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/An_assets_directory_for_my_wiki_with_git_lfs_or_annex__63__/comment_4_ea2c347eaeafe51736d64f28a426630c._comment
Added a comment
[git.ikiwiki.info.git] / doc / forum / An_assets_directory_for_my_wiki_with_git_lfs_or_annex__63__ / comment_4_ea2c347eaeafe51736d64f28a426630c._comment
1 [[!comment format=mdwn
2  username="smcv"
3  avatar="http://cdn.libravatar.org/avatar/0ee943fe632ff995f6f0f25b7167d03b"
4  subject="comment 4"
5  date="2017-07-23T18:02:29Z"
6  content="""
7 > Understand what actually is an underlay directory: As far as I can tell this is simply a directory which is 1. not in the git repo 2. added to the wiki before compilation.
9 Yes. Almost every ikiwiki site is configured to use the basewiki underlay,
10 `/usr/share/ikiwiki/basewiki` or similar, which contains things like
11 the default `style.css` and `ikiwiki/formatting.mdwn`. You can add more
12 underlays, and they behave a bit like a
13 [union mount](https://en.wikipedia.org/wiki/Union_mount): every (non-excluded)
14 page or attachment found in the `srcdir` or in any underlay is used, unless
15 it is masked by a page or attachment of the same name in a \"higher-level\"
16 underlay. The `srcdir` is the highest level, the `basewiki` is the lowest,
17 and the other underlays are stacked in between. So you'd have something like
18 this:
20 * `srcdir`
21     * `index.mdwn` is rendered as `/index.html`
22     * `photos.mdwn` is rendered as `/photos/index.html`
23 * your assets directory
24     * `photos/1234.jpg` is copied to `/photos/1234.jpg`
25 * ... other underlays like `javascript` ...
26 * `basewiki`
27     * `style.css` is copied to `style.css`
28     * `index.mdwn` is ignored because it is masked by the one in the `srcdir`
30 > Remove the assets directory from my ikiwki-git-repo on my local computer and on my server: In theory removing it locally should cause to be removed from the server as well, if we mean \"remove\" here in the sense of delete. However this still leaves us with a) a bloated git repo because it retains the repos history b) we need to put the assets directory somewhere safe locally before removing it from git
32 Yes, you'd need to rebase your git history with `git filter-branch` or similar, or
33 discard the history completely and re-import.
35 > Retain the current directory structure so links won't be broken: This probably means we have to put the assets directory into the gitignore of the ikiwiki-git-repo, since we don't want to move the repo somewhere else.
37 No, the underlay would normally be *next to* the `srcdir` rather than *inside* it,
38 so there would be no need to `.gitignore` it.
40 > Init git lfs or git annex in the assets directory, etc.: I need to start tracking my files in the assets directory with the help of one of these tools in order to ensure easy movement between my local wiki and my server wiki
42 ikiwiki does not currently have any automation for this. You can use git-annex
43 (currently only in direct mode because of the symlink check) but ikiwiki will
44 not help you to sync between the local copy and the server copy.
45 """]]