From 6ab93a3d2d278d395a0aa7b100f8efaeb3198511 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Fri, 30 Dec 2022 17:46:04 +0900 Subject: [PATCH] =?UTF-8?q?`hugo=20sever`=E7=94=A8=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=82=B9=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..99233bd --- /dev/null +++ b/Rakefile @@ -0,0 +1,3 @@ +#!/usr/bin/env rake + +Dir['tasks/**/*.rake'].each { |path| load path } diff --git a/tasks/demo.rake b/tasks/demo.rake new file mode 100755 index 0000000..d10863b --- /dev/null +++ b/tasks/demo.rake @@ -0,0 +1,12 @@ +#!/usr/bin/env rake + +require 'socket' + +desc 'Generate the HTML demo pages including drafts' +task :demo do + ip = Socket.getifaddrs.select{|x| + x.name == "ens160" and x.addr.ipv4? + }.first.addr.ip_address + + sh "hugo server --buildDrafts -w --bind #{ip} -b #{ip} --disableFastRender" +end --- Rakefile | 3 +++ tasks/demo.rake | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Rakefile create mode 100755 tasks/demo.rake diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..99233bd --- /dev/null +++ b/Rakefile @@ -0,0 +1,3 @@ +#!/usr/bin/env rake + +Dir['tasks/**/*.rake'].each { |path| load path } diff --git a/tasks/demo.rake b/tasks/demo.rake new file mode 100755 index 0000000..d10863b --- /dev/null +++ b/tasks/demo.rake @@ -0,0 +1,12 @@ +#!/usr/bin/env rake + +require 'socket' + +desc 'Generate the HTML demo pages including drafts' +task :demo do + ip = Socket.getifaddrs.select{|x| + x.name == "ens160" and x.addr.ipv4? + }.first.addr.ip_address + + sh "hugo server --buildDrafts -w --bind #{ip} -b #{ip} --disableFastRender" +end