====== Présentation ====== Nanoblogger est un joueb / blog dit de "geek". En effet ce joueb est entièrement visible sous forme de pages html statiques, mais la manière d'ajouter des billets ou de générer lesdites pages est pour le moins ... spécial ! Ainsi l'auteur de Nanoblogger, Kevin Hood, a conçu son programme de manière à n'utiliser que certaines commandes BASH (Bourne Again Shell), mais son utilisation se fait également par commandes BASH ! Ainsi la maintenance du site est possible à partir du moment où nous avons accès à la machine par une console, SSH ou pas. Pour exemple de résultat, je vous invite à naviguer sur le [[http://olivier.dossmann.net/joueb/ | BlankoJoueb]]. ====== Installation ====== Je ne détaillerais pas énormément l'installation, seuls quelques points seront abordés. Il faut savoir que l'installation a été effectuée sur __Ubuntu Server 6.06 LTS__. L'installation commence par une simple commande sous Ubuntu : apt-get install nanoblogger Après quoi une nouvelle commande BASH est disponible : nb Grâce à cette commande, créez un nouveau dossier pour contenir votre joueb / blog, à l'aide de la ligne suivante : nb -b /home/olivier/joueb -a Remplacez evidemment **/home/olivier/joueb** par le répertoire que vous désirez utiliser, forcément un répertoire où vous possédez tout les droits. Ensuite vous devez configurer votre nouveau joueb (nanoblogger vous pose la question à laquelle vous répondez //Y// / Yes / Oui). Voici mon fichier de configuration, sachant que je suis sur Ubuntu Server, que j'ai installé les paquets **fortune**, et que je copie mes fichiers vers un serveur ftpperso.free.fr (dont nous donnerons les détails ci après) : # NanoBlogger Weblog Config File - blog.conf ##### Publishing Preferences ##### # set default editor for your weblog (default is $EDITOR). EDITOR="vim" # set default browser for previewing your weblog (defaults to "lynx") BROWSER="elinks" # set default language for your weblog (defaults to "en") NB_LANG="fr" # maximum number of entries to display on the main index page. MAX_ENTRIES="4" # date format used for a new entry (used by the "date" command). # e.g. DATE_FORMAT="%Y-%m-%d %H:%M:%S" DATE_FORMAT="%d/%m/%Y %H:%M:%S" # Date's locale (language) to display in (e.g. DATE_LOCALE="$LANG") # set as blank to have it automatically detected at runtime. DATE_LOCALE="fr_FR.UTF8" # date command arguments (see date's man page). DATE_ARGS="" # set the full URL to your weblog (required for absolute links and # syndication feeds). # e.g. BLOG_URL="http://weblog.user/~foo" ("/" gets appended automatically) BLOG_URL="http://blanko.free.fr/joueb" # stylesheet used for your weblog (should always be relative link). BLOG_CSS="styles/nb_steelblue.css" # shortcut icon for your weblog (should always be relative link). BLOG_ICON="images/favicon.ico" # action to perform on links to entries (e.g. run a server-side script) # must be activated in templates. BLOG_URL_ACTION="" # e.g. (with BLOG_URL set) BLOG_URL_ACTION="$BLOG_URL/cgi-bin/cgicomment.pl?article=" # e.g. (using BASE_URL in templates) BLOG_URL_ACTION="cgi-bin/cgicomment.pl?article=" # set the Language (character encoding) used for your weblog. BLOG_CHARSET="utf-8" # set the mime type used for your weblog # e.g. BLOG_MIMETYPE="text/html" BLOG_MIMETYPE="application/xhtml+xml" # set the timezone for your RSS/Atom feed (should follow W3CDTF date format). # set as blank to have it automatically detected if your system supports "date +%z". # e.g. BLOG_TZD="-05:00" BLOG_TZD="+01:00" # title of your weblog. BLOG_TITLE="Le BlankoJoueb" # description of your weblog. BLOG_DESCRIPTION="Le JOUrnal wEB de Blanko" # default author of your weblog. BLOG_AUTHOR="Blankoworld" # contact information for your weblog. BLOG_CONTACT=''$BLOG_AUTHOR'' # e.g. BLOG_CONTACT=''$BLOG_AUTHOR'' # toggles display of directory index file in links (strongly suggested # for local file browsing) - 0/1 = off/on SHOW_INDEXFILE="1" # show permanent links for each entry - 0/1 = off/on. PERMALINKS="1" # show category links for each entry - 0/1 = off/on. CATEGORY_LINKS="1" # command to run when previewing your weblog. # used by the option and prompt for previewing (when set). BLOG_PREVIEW_CMD="$BROWSER $BLOG_DIR/index.html" # command to run when publishing your weblog to a remote site. # used by the option and prompt for publishing (when set). BLOG_PUBLISH_CMD="" # enable Interactive mode (classic behavior) - 0/1 = off/on. BLOG_INTERACTIVE="1" ##### Archive Preferences ##### # maximum number of entries to display for each category page. MAX_PAGE_ENTRIES="25" # build individual archives of each entry - 0/1 = off/on. ENTRY_ARCHIVES="0" # enable absolute links - 0/1 = off/on. ABSOLUTE_LINKS="0" # set data type to load for category archives - ALL or NOBODY. # ALL = full entry metadata (slow and bigger cache) # NOBODY = all except entry's BODY metadata (faster and smaller cache) # edit the category_entry.htm template accordingly. CATARCH_DATATYPE="NOBODY" # chronological order - 0/1 = normal/reverse. CHRON_ORDER="1" ##### Plugin Preferences ##### # plugins directory, defaults to $NB_BASE_DIR/plugins. # set as blank to have it automatically fallback to defaults. PLUGINS_DIR="/usr/share/nanoblogger/plugins" # user plugins directory, defaults to $BLOG_DIR/plugins. # set as blank to have it automatically fallback to defaults. USR_PLUGINSDIR="" # set the Language for your RSS feeds. BLOG_FEED_LANG="fr_FR" # default entry text formatting (name of the text formatting plugin(s)). # e.g. plugins/entry/format/autobr.sh = autobr ENTRY_FORMAT="autobr" # default article text formatting (name of the text formatting plugin(s)). # e.g. plugins/page/format/markdown.sh = markdown ARTICLE_FORMAT="markdown" # maximum links to yearly archives (-1 = all) #MAX_YEARLINKS="12" # defaults to 12 # maximum links to monthly archives (-1 = all) #MAX_MONTHLINKS="12" # defaults to 12 # calendar plugin - command arguments for cal. see cal's man pages. CAL_ARGS="" # tidy plugin - command arguments for tidy. see tidy's man pages or # http://tidy.sourceforge.net/ TIDY_HTML_ARGS="-asxhtml -n -utf8" TIDY_XML_ARGS="-xml -n -utf8 -wrap 0" # fortune plugin - specify fortune data file to use FORTUNE_FILE="/usr/share/games/fortunes/fr/" # enable category feeds - 0/1 = off/on. ATOM_CATFEEDS="0" RSS_CATFEEDS="1" RSS2_CATFEEDS="0" ##### Cache Preferences ##### # maximum number of entries to store in cache MAX_CACHE_ENTRIES="$MAX_ENTRIES" # set cache management to automatic (1) or manual (0) BLOG_CACHEMNG="1" ##### Metadata File Formatting Preferences ##### # the following settings are here for transitional reasons only. # if upgrading from 3.1 you can either use METADATA_CLOSETAG="-----" # or modify the format of all the entries to match the more preferred # (METADATA_CLOSETAG="END-----") way. # WARNING: changing the following may require manually modifying the # format of all existing entry data files! METADATA_CLOSETAG="END-----" Le programme va générer automatiquement tout les fichiers adéquats. De là vous devez encore : * Franciser votre joueb / blog * Ajouter le code pour FORTUNE dans le template (si vous avez installé FORTUNE et savez ce que c'est) * Modifier les liens (main_links) (pour ajouter des liens vers d'autres jouebs ou sites internets) * Ajouter une introduction (si cela vous chante d'avoir un petit texte sympa dans votre joueb) * Envoyer sur un FTP (si vous aimez travailler sur votre machine mais publier ailleurs) * Ajouter des billets ===== Franciser le joueb / blog ===== Ceci s'adresse aux utilisateurs de Ubuntu Server, voire Ubuntu. Pour les utilisateurs Debian, vous référer à ce billet : [[http://www.linux-france.org/~platu/weblog/archives/2008/04/16/index.html#e2008-04-16T16_08_26.txt | Traductions FR sous Debian]]. Nous en remercions d'ailleurs l'auteur, Philippe LATU. Je vous suggère de : * Télécharger le fichier [[http://nanoblogger.sourceforge.net/downloads/nb-lang.tar.gz | nb-lang.tar.gz]] sur le site officiel * Copier les fichiers en tant que //root// dans le répertoire lang de Nanoblogger, généralement **/usr/share/nanoblogger/lang/fr**. Bien qu'il soit possible de configurer Nanoblogger pour prendre en compte une nouvelle langue, mon NB (nanoblogger) n'a pas fonctionné pour le choix de la langue, j'ai du //remplacer// les fichiers EN par ceux FR. Donc je vous invite à faire de même. ===== Fortune ===== Le module Fortune s'ajoute très simplement : * Éditez le fichier **/home/olivier/joueb/templates/main_index.htm** * Repérez la balise **