diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-03-06 12:05:36 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-03-06 12:05:36 -0500 |
commit | 0e7896690b8dbeb7c74fc0ce1f954159861fc8b3 (patch) | |
tree | 415a5b207c250d4c7905f538bd9982f1bf34fd18 | |
parent | 4401e5b9edcc99766ec0b0bdfd3125b3ddc94e6a (diff) | |
parent | 91ea6629433fb4e21db4b64ef47a8990e80a2533 (diff) |
Merge branch 'master' of ssh://git.kitenet.net/srv/git/ikiwiki.info
-rw-r--r-- | doc/plugins/contrib/sourcehighlight.mdwn | 21 | ||||
-rw-r--r-- | doc/plugins/tag/discussion.mdwn | 5 | ||||
-rw-r--r-- | doc/rcs/git.mdwn | 88 | ||||
-rw-r--r-- | doc/shortcuts.mdwn | 1 | ||||
-rw-r--r-- | doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn | 2 | ||||
-rw-r--r-- | doc/todo/plugin.mdwn | 5 |
6 files changed, 73 insertions, 49 deletions
diff --git a/doc/plugins/contrib/sourcehighlight.mdwn b/doc/plugins/contrib/sourcehighlight.mdwn new file mode 100644 index 000000000..b48fd1a16 --- /dev/null +++ b/doc/plugins/contrib/sourcehighlight.mdwn @@ -0,0 +1,21 @@ +I noticed several places in the wiki talking about similar ideas, so I decided to put a page here to point to what I am working on. + +I have copied otl.pm and am wrapping source-highlight (why this instead of vim highlight, I dunno, I must be a real emacs guy). You can find more or less the latest +version on +[my wiki](http://www.cs.unb.ca/~bremner/wiki/software/sourcehighlight.pm) + +you must specify a highlight_lang=>"foo,bar" in your setup file. +where foo and bar are the (source-supported) languages you want to +highlight +# Issues + +- I would like to have a link to the raw source; using will_render() and then copying the file +may work. +The discussion in [[plugins/contrib/texinfo]] seems relevant. + +- the common case of foo.c and foo.h breaks +because they both generate page working/dir/foo. +It looks to me like ikiwiki is hardcoded to strip the extension in `pagename()` (IkiWiki.pm). +This problem with sourcehighlight needs to be fixed before it is very useful. + +[[DavidBremner]] diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn index 61f375b80..87edf2ab8 100644 --- a/doc/plugins/tag/discussion.mdwn +++ b/doc/plugins/tag/discussion.mdwn @@ -16,4 +16,7 @@ Thanks. That works fine. @Ben: could you publish the code for that? ---David Riebenbauer <davrieb@htu.tugraz.at>
\ No newline at end of file +--David Riebenbauer <davrieb@htu.tugraz.at> + +-- AOLMODE=true echo "I too would really like this feature, which would make cgi free life much +better" --[[DavidBremner]] diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn index bff322d5a..74402e155 100644 --- a/doc/rcs/git.mdwn +++ b/doc/rcs/git.mdwn @@ -47,24 +47,26 @@ repositories: repositories will push to/pull from. It is a bare repository, since there are problems pushing to a repository that has a working directory. This is called _repository_ in [[ikiwiki-makerepo]]'s - manual page. Nominally, this bare repository has a `post-commit` - hook that would change directory to the ikiwiki leaf node repository - below (the working directory for ikiwiki), do a _git pull_, and - refresh ikiwiki to regenerate the wiki with any new content. + manual page. Nominally, this bare repository has a `post-commit` hook + that either is or calls ikiwiki's git wrapper, which changes to the + working directory for ikiwiki, does a _git pull_, and refreshes ikiwiki + to regenerate the wiki with any new content. The [[setup]] page describes + how to do this. + * The second repository is a clone of the bare root repository, and has a working tree which is used as ikiwiki's srcdir for compiling the wiki. **Never** push to this repository. When running as a [[cgi]], the changes are committed to this repository, and pushed to the master repository above. This is called _srcdir_ in [[ikiwiki-makerepo]]'s manual page. + * The other (third, fourth, fifth, sixth -- however many pleases you) repositories are also clones of the bare root repository above -- and these have a working directory for you to work on. Use either the `git` transport (if available), or `ssh`. These repositories may be on remote machines, your laptop, whereever you find convenient to hack on your wiki. you can commit local changes to the version on - the laptop, perhaps while offline. You can browse and edit the wiki - using a local web server. Any new content should be pushed to the + the laptop, perhaps while offline. Any new content should be pushed to the bare master repository when you are ready to publish it, and then the post-commit hook of the bare repository will ensure that the ikiwiki's source directory is updated, and the ikiwiki refreshed @@ -102,45 +104,37 @@ repository, should only be writable by the wiki's admin, and *not* by the group. Take care that ikiwiki uses a umask that does not cause files in the srcdir to become group writable. (umask 022 will work.) -## Configuration - -### Ikiwiki working directory - -* Configure a cgi wrapper as usual, but configure the git wrapper to - be written to the post-commit hook of the git clone being used by - the ikiwiki (clone 0 in the image). Set in the configuration: - - gitorigin_branch=> "origin", - ## git post-commit wrapper - wrapper => "/path/to/bare/repo/.git/hooks/post-commit", - - - -### Working clones (Clone 1 .. N in the image) - -* By default, ikiwiki pulls and pushes from `origin`. This is not - ideal for the working clones, since the user might go through - several iterations of a posting before pushing to the bare root of - the repository tree. In the configuration, set: - - gitorigin_branch => "", - ## git post-commit wrapper - wrapper => "/working/dir/.git/hooks/post-commit", - - Then just committing should refresh the ikiwiki on the local host. - -* You can optionally enable to the [[plugins/mirrorlist]] plugin, - and configure it so that each page links to the corresponding page on the - server. - -Now just run `ikiwiki -setup wiki.setup -getctime` and you should be -good to go. (You only need the slow `-getctime` option the first time you -run setup.) - -Use standard git commands to handle pulling from and pushing to the server. +## Optionally using a local wiki to preview changes + +When working on the "working clones" to add content to your wiki, +it is common (but optional) practice to preview your changes using a +private wiki on the local host before publishing the updates by +sending it to the root repository. If you do want to setup a private +wiki, you will have to have another setup file and and an ikiwiki +installation on your local machine. You will need all the packages +this implies -- a web server, git, ikiwiki, etc. However, there is a +_caveat_: by default, ikiwiki pulls and pushes from `origin`. This is +not ideal for the working clones on the local machine, since you might +go through several iterations of a page before pushing to the bare +root of the repository tree (and thus publishing it on your public wiki). +You do not want the action of refreshing the local wiki in order to +review your work to accidentally publish the +contents before you are ready. In order to prevent the git push that +is the normal behaviour of ikiwiki, set the configuration of the local wiki: + + gitorigin_branch => "", + ## git post-commit wrapper + wrapper => "/working/dir/.git/hooks/post-commit", + +Then just committing should refresh the private ikiwiki on the local +host. Now just run `ikiwiki -setup localwiki.setup -getctime` and +you should be good to go. (You only need the slow `-getctime` option +the first time you run setup.) Use standard git commands to handle +pulling from and pushing to the server. **Note**: Currently, after +pulling changes from the bare root repository, you will need to +manually update the local wiki, with a command such as `ikiwiki +-setup localwiki.setup -refresh`. This is because git 1.5.4 doesn't +have a hook that is run locally after pulling changes. Newer +versions of git will have a `post-merge` hook that should work for +this purpose. -Note: Currently, after pulling changes, you will need to manually update -the wiki, with a command such as `ikiwiki -setup wiki.setup -refresh`. This -is because git 1.5.4 doesn't have a hook that is run locally after pulling -changes. Newer versions of git will have a `post-merge` hook that should -work for this purpose. diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 50f1e624e..764ae6027 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -20,6 +20,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=debbug url="http://bugs.debian.org/%s" desc="bug #%s"]] * [[!shortcut name=deblist url="http://lists.debian.org/debian-%s" desc="debian-%s@lists.debian.org"]] * [[!shortcut name=debpkg url="http://packages.debian.org/%s"]] +* [[!shortcut name=debpkgsid url="http://packages.debian.org/sid/%s"]] * [[!shortcut name=debpts url="http://packages.qa.debian.org/%s"]] * [[!shortcut name=debmsg url="http://lists.debian.org/msgid-search/%s"]] * [[!shortcut name=debrt url="https://rt.debian.org/Ticket/Display.html?id=%s"]] diff --git a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn index c39261e82..00108918c 100644 --- a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn +++ b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn @@ -8,3 +8,5 @@ as the type argument. Together with the ability to have [[wiki-formatted_comments|wiki-formatted_comments_with_syntax_plugin]], this would allow the use of ikiwiki for [[wikipedia literate programming]]. + +* I have started something along these lines see [[plugins/contrib/sourcehighlight]]. For some reason I started with source-highlight [[DavidBremner]] diff --git a/doc/todo/plugin.mdwn b/doc/todo/plugin.mdwn index c502b08c9..901e8e55e 100644 --- a/doc/todo/plugin.mdwn +++ b/doc/todo/plugin.mdwn @@ -54,4 +54,7 @@ There is work in progress at -- [[DavidBremner]] * What about a translator plugin using source-highlight or some alternative to view a collection of source code. I have a collection -of e.g. java for students to look at. I'd like to e.g. update the tags in the java file, then rebuild the wiki. +of e.g. java for students to look at. I'd like to e.g. update the tags in the java file, then rebuild the wiki. A first hack, can be found in +[my wiki](http://www.cs.unb.ca/~bremner/wiki/software/java.pm) +Among many possible improvements would be generalizing to handle other languages. I have to play some more. +-- [[DavidBremner]] |