Giter VIP home page Giter VIP logo

www_haskell-ita_it_website's Introduction

blog.haskell-ita.it

How to Update the Website

Initial Setup

Clone this repo locally.

Compile the application with Nix or Stack.

Nix Instructions

Execute

./generate-nix-project.sh
nix-shell ./shell.nix
cabal build
./dist/build/site/site clean
./dist/build/site/site build

Stack Instructions

Execute

stack build
stack exec site clean
stack exec site build
stack exec site watch

Website Configuration

The file site.hs contains the rules used from Hakyll for generating the website. Every time you change them:

  • recomplie the application
  • clean the website with site clean

Website Preview

Execute

site watch

for a live preview of the website. In case of change of files, the preview is updated.

Adding a Post

Add posts inside posts/ directory, in the proper subdirector, playing the role of category.

Use already defined posts as example. Hakyll uses Pandoc that is very powerful and many different type of files are accepted.

Teaser

It is convenient to have an excerpt of a post displayed on the index page along with a “Read more…” link to encourage your readers to read the rest of the post. For doing this put the teaser symbol where the excerpt end.

<!--more-->

In case of Literate Haskell Code use instead

<div></div><!--more-->

for bypassing the byrding style > character.

Images

Use something like

<img src="/images/photos/meetup_2015_estate.jpg" alt="photo" class="img-thumbnail">

on the first column of a Markdown file. Pandoc will insert directly the HTML code. The class is used from Bootstrap CSS template for scaling and decorating the image.

Change Top Menu

Change the function renderTagListForTopMenu inside site.hs

Change Page Format

Change all files in templates directory. Same format is repeated for:

  • blog-list
  • blog post
  • page

Change "About" Page

Change about.md file.

Website Update

Execute

site build

for updating the _site/ directory. In case of big changes it is better a

site clean
site build

Then make a Git commit, and push to the remote repo.

git status
git add <missing-files>
git commit -a -m "<some-message>"
git push

The hosting server will make a pull, and publish the content of _site/ directory. All other content will be not be published.

Known Problems

If you miss the tag date, and author Hakyll generates a not clear error message like:

 [ERROR] Missing field $posts$ in context for item 3/index.html

In case of community pages uses community as author.

Project Roadmap (TODO)

Initial Release

TODO provare a fare subscribe ai FEEDS quando ho installato

TODO chiedere se puo` diventare la pagina standard di Haskell invece che il blog:

  • cancello la knowldge-base su GitHub
  • metto su un branch a parte il sito vecchio
  • faccio puntare blog.haskell-ita.it a www.haskell-ita.it
  • sostituisco il sito attuale www.haskell-ita.it con questo

Automatic Update of the WebSite

TODO create a web-hook on GitHub

TODO the web server receive the hook, make git pull of the repo, and then make a site build

TODO daily the web server execute also a site clean and regeneration, in order to manage the big changes in the structure of the code of the site

www_haskell-ita_it_website's People

Contributors

arguggi avatar fgaz avatar ivanopagano avatar larsen avatar lucamolteni avatar massimo-zaniboni avatar vitalyolegovic avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.