Skip to content

Commit f5a45db

Browse files
committed
updated post
1 parent f976400 commit f5a45db

File tree

3 files changed

+36
-307
lines changed

3 files changed

+36
-307
lines changed

Rakefile

Lines changed: 0 additions & 307 deletions
This file was deleted.

RoboFile.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
class Robofile
3+
{
4+
use Robo\Output;
5+
use Robo\Task\FileSystem;
6+
use Robo\Task\Git;
7+
8+
function post()
9+
{
10+
$title = $this->ask("Post title");
11+
$file = strtolower(str_replace([' ',':'], ['-','-'], $title));
12+
$date = date('Y-m-d');
13+
$this->taskWriteToFile("_posts/$date-$file.markdown")
14+
->line('---')
15+
->line('layout: post')
16+
->line("title: $title")
17+
->line("date: $date 01:03:50")
18+
->line("---\n")
19+
->run();
20+
}
21+
22+
function publish()
23+
{
24+
$this->taskGit()
25+
->add('-A')
26+
->commit('updated post')
27+
->push()
28+
->run();
29+
}
30+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: post
3+
title: Codeception 1.8.3: Laravel and Yii2 DB actions
4+
date: 2014-02-13 01:03:50
5+
---
6+

0 commit comments

Comments
 (0)