old-blog icon indicating copy to clipboard operation
old-blog copied to clipboard

can u write a detailed installation guide about ur blog: http://www.skybluetrades.net/blog/ ?

Open luckypoem opened this issue 8 years ago • 13 comments

hi. i see ur blog : http://www.skybluetrades.net/blog/ ,i like its pagination feature very much. i want to install ur blog on my VPS, i cloned ur blog repo: git clone https://github.com/ian-ross/blog cd blog

but after i get into blog dir,i don't know how to install it.so, can u write a detailed installation guide about ur blog: http://www.skybluetrades.net/blog/?

thank u very much

luckypoem avatar Aug 19 '16 09:08 luckypoem

@ian-ross Can you please let me know which *nix distribution do you use to build your blog sources? On Ubuntu 15.04, using "cabal build" gives me dependency errors.

shakthimaan avatar Sep 25 '16 18:09 shakthimaan

hi.

my linux vps is debian7. ur blog repo actually doesn't have blog.cabal file,so i can't use "cabal sandbox init && cabal install" to install it.

luckypoem avatar Sep 26 '16 02:09 luckypoem

@luckypoem My question was for Ian. The blog.cabal is present in the build/ folder.

shakthimaan avatar Sep 26 '16 04:09 shakthimaan

hi。

root@AR:/usr/local/www.skybluetrades.net/build# ls blog.cabal blog.hs dist LICENSE Setup.hs TikZ.hs root@AR:/usr/local/www.skybluetrades.net/build# stack init root@AR:/usr/local/www.skybluetrades.net/build# ls blog.cabal blog.hs dist LICENSE Setup.hs stack.yaml TikZ.hs root@AR:/usr/local/www.skybluetrades.net/build# stack build

it shows: ... /usr/local/www.skybluetrades.net/build/blog.hs:564:23: Couldn't match expected type ‘time-1.5.0.1:Data.Time.Format.Locale.TimeLocale’ with actual type ‘System.Locale.TimeLocale’ NB: ‘time-1.5.0.1:Data.Time.Format.Locale.TimeLocale’ is defined in ‘Data.Time.Format.Locale’ in package ‘time-1.5.0.1’ ‘System.Locale.TimeLocale’ is defined in ‘System.Locale’ in package ‘old-locale-1.0.0.7’ In the first argument of ‘formatTime’, namely ‘defaultTimeLocale’ In the expression: formatTime defaultTimeLocale "%F %T" t Completed 126 action(s). -- While building package blog-0.1.0.0 using: /root/.stack/setup-exe-cache/i386-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/i386-linux/Cabal-1.22.5.0 build exe:blog --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 root@AR:/usr/local/www.skybluetrades.net/build#

how to fix the error encountered after running "stack build"?

luckypoem avatar Sep 26 '16 08:09 luckypoem

The code appears to be out of date with respect to Hackage. I've just been using it within a Cabal sandbox I set up a long time ago. I've not been blogging recently, so haven't been using this. If you want to fix it up to use with Stack and the latest Hakyll, be my guest.

ian-ross avatar Sep 26 '16 09:09 ian-ross

I had cloned your repo after May 20, 2012 (74dc20d5102e74fce498d4c38d81c6f2c2f8f2f9) and started tweaking it to my needs. There was no .cabal added to the repo at that instant.

The blog.cabal was added on October 11, 2012 https://github.com/ian-ross/blog/commit/dc92eb67542de14afdd97cce91a3c9784bb78957

I should re-play all your changes to my repo, including the migration to Hakyll 4?

shakthimaan avatar Oct 07 '16 10:10 shakthimaan

@ian-ross , hi.

i modified blog.hs: delete "import System.Locale (defaultTimeLocale)" change "import Data.Time.Format (formatTime)" to be "import Data.Time.Format (formatTime, defaultTimeLocale)"

then i ran "ghc --make blog.hs", root@AR:/usr/local/ian-ross-blog/build# ghc --make blog.hs [1 of 2] Compiling TikZ ( TikZ.hs, TikZ.o )

TikZ.hs:148:23: error: Variable not in scope: md5 :: C8.ByteString -> a0 root@AR:/usr/local/ian-ross-blog/build#

so,how to fix the TikZ error?

luckypoem avatar Nov 05 '16 01:11 luckypoem

I've now set things up to use Stack. Assuming you have Stack installed, if you clone the repo and do stack build in the build directory, things should just work.

ian-ross avatar Dec 10 '16 16:12 ian-ross

hi.

root@AR:/usr/local/ian-ross-blog/build# stack build Downloaded nightly-2016-12-10 build plan.
Shallow package index repo detected, transitioning to a full clone... Updating package index Hackage (mirrored at https://github.com/commercialhaskell/all-cabal-hashes.git) ...Running /usr/bin/git fetch --unshallow in directory /root/.stack/indices/Hackage/git-update/all-cabal-hashes/ exited with ExitFailure 129

error: unknown option `unshallow' usage: git fetch [] [ [...]] or: git fetch [] or: git fetch --multiple [] [( | )...] or: git fetch --all []

-v, --verbose         be more verbose
-q, --quiet           be more quiet
--all                 fetch from all remotes
-a, --append          append to .git/FETCH_HEAD instead of overwriting
--upload-pack <path>  path to upload pack on remote end
-f, --force           force overwrite of local branch
-m, --multiple        fetch from multiple remotes
-t, --tags            fetch all tags and associated objects
-n                    do not fetch all tags (--no-tags)
-p, --prune           prune remote-tracking branches no longer on remote
--recurse-submodules[=<on-demand>]
                      control recursive fetching of submodules
--dry-run             dry run
-k, --keep            keep downloaded pack
-u, --update-head-ok  allow updating of HEAD ref
--progress            force progress reporting
--depth <depth>       deepen history of shallow clone

root@AR:/usr/local/ian-ross-blog/build#

how to fix it? thank you very much!

luckypoem avatar Dec 11 '16 13:12 luckypoem

You have an old version of Git. The current version is 2.10.2. The unshallow option was introduced in version 1.8.2, which was released in March 2013, so your version must be older than that.

ian-ross avatar Dec 11 '16 18:12 ian-ross

I was able to run "stack build" on (Parabola GNU/Linux Libre). But, when I try to generate _site using ("./path/to/blog build"), it fails at:

  updated blog/tags/science.html
  updated blog/tags/sleep.html
  updated blog/tags/web-programming.html
  updated blog/tags/yesod.html
  updated blog/tags/yoga.html
  [ERROR] sass: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

What am I missing? Using ghc 8.0.1-1.

$ git --version
git version 2.11.0

shakthimaan avatar Dec 22 '16 12:12 shakthimaan

@shakthimaan ,u should install ruby firstly,then run "gem install sass" to install sass.

luckypoem avatar Dec 22 '16 13:12 luckypoem

I do not remember (or have) Ruby installed when using Hakyll 3.x.

https://github.com/shakthimaan/shakthimaan-blog/blob/b58077d3cf4eda2ca646fa3af5ca5f1fd66666eb/bin/blog.hs#L152

It worked after I installed Ruby, and did "gem install sass". Thanks!

shakthimaan avatar Dec 22 '16 15:12 shakthimaan