From c03c40bdbbc6f0aeaf57c3b09b4158005be9cc1e Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Wed, 8 Feb 2017 12:08:10 -0600 Subject: [PATCH] Adding bashrc and cgit pages --- Bashrc.wiki | 2 ++ Cgit.wiki | 71 ++++++++++++++++++++++++++++++++++++++++++++ Thurstylark-VPS.wiki | 2 +- index.wiki | 2 ++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 Bashrc.wiki create mode 100644 Cgit.wiki diff --git a/Bashrc.wiki b/Bashrc.wiki new file mode 100644 index 0000000..8123a0a --- /dev/null +++ b/Bashrc.wiki @@ -0,0 +1,2 @@ +=Bashrc= + diff --git a/Cgit.wiki b/Cgit.wiki new file mode 100644 index 0000000..a7b4724 --- /dev/null +++ b/Cgit.wiki @@ -0,0 +1,71 @@ +=CGit= + + +===Push To Deploy=== + +The remote repo is set up to deploy the entire contents of the repo to `/srv/cgit` by using the `post-receive` hook in the git repo. + +{{{class="prettyprint" +#!/bin/bash +GIT_WORK_TREE=/srv/cgit git checkout -f +}}} + +This allows configuration changes to be edited on a local repo, committed, then pushed to the remote to apply changes. + +===About Page=== + +Had a problem with the about page not showing when the appropriate file names are definied as readme files. Here was the problematic config: + +{{{class="prettyprint linenums" + +#css=/cgit-css/cgit.css +#logo=/cgit-css/cgit.png + +root-title=Thurstylark +root-desc=Projects and Dotfiles + +source-filter=/srv/cgit/syntax-highlighting.py +about-filter=/usr/lib/cgit/filters/about-formatting.sh + +enable-git-config=1 +scan-path=/srv/git + +enable-http-clone=1 +clone-url=https://git.thurstylark.com/$CGIT_REPO_URL + + +# +# Search for these files in the root of the default branch of repositories +# for coming up with the about page: +# +readme=:README.md +readme=:readme.md +readme=:README.mkd +readme=:readme.mkd +readme=:README.rst +readme=:readme.rst +readme=:README.html +readme=:readme.html +readme=:README.htm +readme=:readme.htm +readme=:README.txt +readme=:readme.txt +readme=:README +readme=:readme +readme=:INSTALL.md +readme=:install.md +readme=:INSTALL.mkd +readme=:install.mkd +readme=:INSTALL.rst +readme=:install.rst +readme=:INSTALL.html +readme=:install.html +readme=:INSTALL.htm +readme=:install.htm +readme=:INSTALL.txt +readme=:install.txt +readme=:INSTALL +readme=:install +}}} + +The solution was to move the `scan-path` directive to the end of my cgitrc. See the [[https://git.zx2c4.com/cgit/tree/cgitrc.5.txt#n392|cgitrc manpage]] for details. diff --git a/Thurstylark-VPS.wiki b/Thurstylark-VPS.wiki index 070d0d2..b2643c5 100644 --- a/Thurstylark-VPS.wiki +++ b/Thurstylark-VPS.wiki @@ -4,6 +4,6 @@ Just a little Linode VPS running Arch, but it's a powerful little sucker. ==Services== -* Cgit +* [[Cgit]] * Apache * [[Weechat]] diff --git a/index.wiki b/index.wiki index bb8e83a..38e1e5a 100644 --- a/index.wiki +++ b/index.wiki @@ -14,6 +14,8 @@ ===Dotfiles=== +* [[Bashrc]] + === General === * [[Tasks]] -- Things to be done