[Assorted-commits] SF.net SVN: assorted:[1744] personal-site/trunk
Brought to you by:
yangzhang
|
From: <yan...@us...> - 2011-01-28 19:49:41
|
Revision: 1744
http://assorted.svn.sourceforge.net/assorted/?rev=1744&view=rev
Author: yangzhang
Date: 2011-01-28 19:49:35 +0000 (Fri, 28 Jan 2011)
Log Message:
-----------
Finish documenting setup, add gitit.conf
Modified Paths:
--------------
personal-site/trunk/README
Added Paths:
-----------
personal-site/trunk/gitit.conf
Modified: personal-site/trunk/README
===================================================================
--- personal-site/trunk/README 2011-01-25 00:19:40 UTC (rev 1743)
+++ personal-site/trunk/README 2011-01-28 19:49:35 UTC (rev 1744)
@@ -14,14 +14,22 @@
- /var/www/
- wp database in mysql
-Install packages:
+System
+------
- # Haskell Platform
+Install packages (this is probably incomplete; it was written up long
+afterward):
+
+ # Haskell Platform, LAMP, LaTeX (for Gitit), Keychain (for git pulls)
+ sudo aptitude install python-software-properties
sudo add-apt-repository ppa:justinbogner/haskell-platform
- sudo aptitude install haskell-platform
+ sudo aptitude install haskell-platform build-essential \
+ apache2 mysql-server libapache2-mod-proxy-html php5 php5-mysql \
+ texlive-latex-extra \
+ keychain
# Pandoc with support for source code highlighting
- sudo cabal install pandoc -fhighlighting
+ sudo cabal install --global -fhighlighting highlighting-kate pandoc
# Our own Gitit, which sets Pandoc's tabstop to 2 instead of default of 4
git clone gi...@gi...:yang/gitit.git
@@ -31,12 +39,21 @@
# Misc
sudo a2enmod headers proxy_html proxy_http rewrite
-Set up data:
+Static Website
+--------------
- # After unpacking old www/
+Set up static web data:
+
+ # After unpacking old www/, which includes wp/
sudo chgrp -R yang /var/www/
sudo chmod -R g+w /var/www/
+ # Make sure wp/ is owned by www-data
+Publish static site content with `make publish`.
+
+WordPress
+---------
+
# MySQL
mysql -u root -p -e '
create database wp;
@@ -56,6 +73,9 @@
In WP, edit twentyten's style.css, header.php. Working on a better solution.
+Apache
+------
+
In sites-enabled/000-default:
<Directory /var/www/wp/>
@@ -76,8 +96,58 @@
RequestHeader unset Accept-Encoding
</Location>
-Publish static site content with `make publish`.
+Gitit
+-----
+Create an ssh key, register it on Github, and have keychain manage it.
+
+Then set up Gitit. Either copy over the old directory or set it up from
+scratch. If setting up from scratch, don't forget to push the old wikidata and
+to copy over the gitit-users and gitit.log files. Here's how to set up from
+scratch:
+
+ # Set up gitit
+ mkdir ~/gitit/
+ ln -s .../personal-site/trunk/gitit.conf ~/gitit/config
+ cd ~/gitit/
+ gitit -f config # ctrl-c once it creates the missing files/dirs
+
+ # Install jsMath, if using that
+ wget -P /tmp/ \
+ 'http://sourceforge.net/projects/jsmath/files/jsMath/3.6e/jsMath-3.6e.zip' \
+ 'http://sourceforge.net/projects/jsmath/files/jsMath%20Image%20Fonts/1.3/jsMath-fonts-1.3.zip'
+ mkdir static/js/
+ unzip -d static/js/ /tmp/jsMath-3.6e.zip
+ mv static/js/jsMath{-3.6e,}
+
+ # Use your notes git repository
+ rm -rf wikidata/ # Remove the default wikidata
+ git clone gi...@gi...:yang/notes.git
+
+ # Copy over gitit.log, gitit-users
+
+Now create /etc/init/gitit.conf to start gitit on boot:
+
+ start on runlevel [2345]
+ stop on runlevel [!2345]
+
+ respawn
+
+ exec su - yang -c 'cd gitit/; exec gitit -f config'
+
+Install this cronjob script:
+
+ ln -s .../assorted/configs/trunk/src/cron/pull-gitit.bash ~/.cron/
+
+Add this to your crontab to pull every minute (test it!):
+
+ * * * * * $HOME/.cron/pull-gitit.bash
+
+Start everything:
+
+ sudo start gitit # make sure this is working!
+ sudo service apache2 restart
+
Related
=======
Added: personal-site/trunk/gitit.conf
===================================================================
--- personal-site/trunk/gitit.conf (rev 0)
+++ personal-site/trunk/gitit.conf 2011-01-28 19:49:35 UTC (rev 1744)
@@ -0,0 +1,238 @@
+# gitit wiki configuration file
+
+port: 5001
+# sets the port on which the web server will run.
+
+wiki-title: Yang's Wiki
+# the title of the wiki.
+
+repository-type: Git
+# specifies the type of repository used for wiki content.
+# Options are Git, Darcs, and Mercurial.
+
+repository-path: wikidata
+# specifies the path of the repository directory. If it does not
+# exist, gitit will create it on startup.
+
+authentication-method: form
+# 'form' means that users will be logged in and registered
+# using forms in the gitit web interface. 'http' means
+# that gitit will assume that HTTP authentication is in
+# place and take the logged in username from the "Authorization"
+# field of the HTTP request header (in addition,
+# the login/logout and registration links will be
+# suppressed). 'generic' means that gitit will assume that
+# some form of authentication is in place that directly
+# sets REMOTE_USER to the name of the authenticated user
+# (e.g. mod_auth_cas on apache).
+
+user-file: gitit-users
+# specifies the path of the file containing user login information.
+# If it does not exist, gitit will create it (with an empty user list).
+# This file is not used if 'http' is selected for authentication-method.
+
+session-timeout: 60
+# number of minutes of inactivity before a session expires.
+
+static-dir: static
+# specifies the path of the static directory (containing javascript,
+# css, and images). If it does not exist, gitit will create it
+# and populate it with required scripts, stylesheets, and images.
+
+default-page-type: Markdown
+# specifies the type of markup used to interpret pages in the wiki.
+# Possible values are Markdown, RST, LaTeX, HTML, Markdown+LHS, RST+LHS,
+# and LaTeX+LHS. (The +LHS variants treat the input as
+# literate Haskell. See pandoc's documentation for more details.) If
+# Markdown is selected, pandoc's syntax extensions (for footnotes,
+# delimited code blocks, etc.) will be enabled. Note that pandoc's
+# reStructuredText parser is not complete, so some pages may not be
+# rendered correctly if RST is selected. The same goes for LaTeX and
+# HTML.
+
+math: jsMath
+# specifies how LaTeX math is to be displayed. Possible values
+# are MathML, raw, jsMath, and google. If mathml is selected, gitit will
+# convert LaTeX math to MathML and link in a script, MathMLinHTML.js,
+# that allows the MathML to be seen in Gecko browsers, IE +
+# mathplayer, and Opera. In other browsers you may get a jumble
+# of characters. If raw is selected, the LaTeX math will be displayed
+# as raw LaTeX math. If jsMath is selected, gitit will link to
+# the script /js/jsMath/easy/load.js, and will assume that jsMath
+# has been installed into the js/jsMath directory. This is the most
+# portable solution. If google is selected, the google chart API is
+# called to render the formula as an image. This requires a connection
+# to google, and might raise a technical or a privacy problem.
+
+show-lhs-bird-tracks: no
+# specifies whether to show Haskell code blocks in "bird style",
+# with "> " at the beginning of each line.
+
+templates-dir: templates
+# specifies the path of the directory containing page templates.
+# If it does not exist, gitit will create it with default templates.
+# Users may wish to edit the templates to customize the appearance of
+# their wiki. The template files are HStringTemplate templates.
+# Variables to be interpolated appear between $'s. Literal $'s must be
+# backslash-escaped.
+
+log-file: gitit.log
+# specifies the path of gitit's log file. If it does not exist,
+# gitit will create it. The log is in Apache combined log format.
+
+log-level: INFO
+# determines how much information is logged.
+# Possible values (from most to least verbose) are DEBUG, INFO,
+# NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY.
+
+front-page: Front Page
+# specifies which wiki page is to be used as the wiki's front page.
+# Gitit creates a default front page on startup, if one does not exist
+# already.
+
+no-delete: Front Page, Help
+# specifies pages that cannot be deleted through the web interface.
+# (They can still be deleted directly using git or darcs.)
+# A comma-separated list of page names. Leave blank to allow
+# every page to be deleted.
+
+no-edit: Help
+# specifies pages that cannot be edited through the web interface.
+# Leave blank to allow every page to be edited.
+
+default-summary:
+# specifies text to be used in the change description if the author
+# leaves the "description" field blank. If default-summary is blank
+# (the default), the author will be required to fill in the description
+# field.
+
+table-of-contents: yes
+# specifies whether to print a tables of contents (with links to
+# sections) on each wiki page.
+
+plugins:
+# specifies a list of plugins to load. Plugins may be specified
+# either by their path or by their module name. If the plugin name
+# starts with Gitit.Plugin., gitit will assume that the plugin is
+# an installed module and will not try to find a source file.
+# Examples:
+# plugins: plugins/DotPlugin.hs, CapitalizeEmphasisPlugin.hs
+# plugins: plugins/DotPlugin
+# plugins: Gitit.Plugin.InterwikiLinks
+
+use-cache: no
+# specifies whether to cache rendered pages. Note that if use-feed
+# is selected, feeds will be cached regardless of the value of use-cache.
+
+cache-dir: cache
+# directory where rendered pages will be cached
+
+max-upload-size: 100K
+# specifies an upper limit on the size (in bytes) of files uploaded
+# through the wiki's web interface.
+# To disable uploads, set this to 0K.
+# This will result in the uploads link disappearing
+# and the _upload url becoming inactive.
+
+max-page-size: 100K
+# specifies an upper limit on the size (in bytes) of pages
+
+debug-mode: no
+# if "yes", causes debug information to be logged while gitit is running.
+
+compress-responses: no
+# specifies whether HTTP responses should be compressed.
+
+mime-types-file: /etc/mime.types
+# specifies the path of a file containing mime type mappings.
+# Each line of the file should contain two fields, separated by
+# whitespace. The first field is the mime type, the second is a
+# file extension. For example:
+# video/x-ms-wmx wmx
+# If the file is not found, some simple defaults will be used.
+
+use-recaptcha: no
+# if "yes", causes gitit to use the reCAPTCHA service
+# (http://recaptcha.net) to prevent bots from creating accounts.
+
+recaptcha-private-key:
+recaptcha-public-key:
+# specifies the public and private keys for the reCAPTCHA service.
+# To get these, you need to create an account at http://recaptcha.net.
+
+access-question:
+access-question-answers:
+# specifies a question that users must answer when they attempt to create
+# an account, along with a comma-separated list of acceptable answers.
+# This can be used to institute a rudimentary password for signing up as
+# a user on the wiki, or as an alternative to reCAPTCHA.
+# Example:
+# access-question: What is the code given to you by Ms. X?
+# access-question-answers: RED DOG, red dog
+
+mail-command: sendmail %s
+# specifies the command to use to send notification emails.
+# '%s' will be replaced by the destination email address.
+# The body of the message will be read from stdin.
+# If this field is left blank, password reset will not be offered.
+
+reset-password-message:
+ > From: nobody@$hostname$
+ > To: $useremail$
+ > Subject: Wiki password reset
+ >
+ > Dear $username$:
+ >
+ > To reset your password, please follow the link below:
+ > http://$hostname$/notes$resetlink$
+ >
+ > Yours sincerely,
+ > The Wiki Master
+
+# gives the text of the message that will be sent to the user should she
+# want to reset her password, or change other registration info.
+# The lines must be indented, and must begin with '>'. The initial
+# spaces and '> ' will be stripped off. $username$ will be replaced
+# by the user's username, $useremail$ by her email address,
+# $hostname$ by the hostname on which the wiki is running (as
+# returned by the hostname system call), $port$ by the port on
+# which the wiki is running, and $resetlink$ by the
+# relative path of a reset link derived from the user's existing
+# hashed password. If your gitit wiki is being proxied to a location
+# other than the root path of $port$, you should change the link to
+# reflect this: for example, to
+# http://$hostname$/path/to/wiki$resetlink$ or
+# http://gitit.$hostname$$resetlink$
+
+use-feed: yes
+# specifies whether an ATOM feed should be enabled (for the site and for
+# individual pages)
+
+base-url:
+# the base URL of the wiki, to be used in constructing feed IDs.
+# If this field is left blank, gitit will get the base URL from the
+# request header 'Host'. For most users, this should be fine, but
+# if you are proxying a gitit instance to a subdirectory URL, you will
+# want to set this manually.
+
+feed-days: 30
+# number of days to be included in feeds.
+
+feed-refresh-time: 60
+# number of minutes to cache feeds before refreshing
+
+pdf-export: no
+# TODO enable only if there are no security issues
+# if yes, PDF will appear in export options. PDF will be created using
+# pdflatex, which must be installed and in the path. Note that PDF
+# exports create significant additional server load.
+
+pandoc-user-data:
+# if a directory is specified, this will be searched for pandoc
+# customizations. These can include a templates/ directory for custom
+# templates for various export formats, an S5 directory for custom
+# S5 styles, and a reference.odt for ODT exports. If no directory is
+# specified, $HOME/.pandoc will be searched. See pandoc's README for
+# more information.
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|