1.Split and pick the filename from the post of full path:
{% assign file = page.path | split: "/" | last %}
The page.path which respected the filepath that jekyll does generated.
| [Unit] | |
| Description=Daemon to start Jekyll service | |
| [Service] | |
| Type=simple | |
| ExecStart=/usr/local/bin/jekyll serve --source /home/user/repos/blog --destination /srv/jekyll/blog | |
| ExecStop=/usr/local/bin/jekyll clean --source /home/user/repos/blog --destination /srv/jekyll/blog | |
| PIDFile=/var/run/jekyll.pid | |
| [Install] |
| [Unit] | |
| Description=Daemon to start Shadowsocks Client | |
| Wants=network-online.target | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/usr/local/bin/sslocal -c /etc/shadowsocks/client.json | |
| PIDFil=/var/run/sslocal.pid |
| O = [1, 2, 3] | |
| A = [11, 22, 33] | |
| B = [111, 222, 333] | |
| C = [1111, 2222, 3333] | |
| M = [O, A, B, C] | |
| def transpose0(m): | |
| return [tuple(r[c] for r in m) for c in range(len(m[0]))] |
| (define combo | |
| (let ([d (- n r)]) | |
| (λ (n r) | |
| (/ (factorial n 1) | |
| (factorial r 1) | |
| (factorial d 1))))) | |
| (define factorial | |
| (λ (x s) | |
| (cond [(< x 1) s] |
| pragma solidity ^0.4.24; | |
| pragma experimental "v0.5.0"; | |
| contract ListSystematically { | |
| struct Holder { | |
| uint256 amount; | |
| uint256 frees; | |
| Share[] shares; | |
| } |
| (define (cons1 x y) | |
| (λ (m) (m x y))) | |
| (define (car1 z) | |
| (z (λ (p q) p))) | |
| (define (cdr1 z) | |
| (z (λ (p q) q))) | |
| (define (cons2 x y) |
| (define reverse | |
| (letrec ([loop (λ (l1 l2) | |
| (cond [(null? l1) l2] | |
| [else (loop (cdr l1) (cons (car l1) l2))]))]) | |
| (λ (l) (loop l '())))) | |
| (reverse '(a b c d e f g)) | |
| ;; ⇒ '(g f e d c b a) |
| class QuickSort | |
| def self.sort!(keys) | |
| quick(keys,0,keys.size-1) | |
| end | |
| private | |
| def self.quick(keys, left, right) | |
| if left < right |