mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 21:06:50 +00:00
Fixes running Jekyll preview in devcontainer (#9920)
This commit is contained in:
parent
6c3a65edb5
commit
16f647642c
@ -6,6 +6,9 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
# Use Bash as the default shell
|
# Use Bash as the default shell
|
||||||
ENV SHELL=/bin/bash
|
ENV SHELL=/bin/bash
|
||||||
|
|
||||||
|
# Set an environment variable to be able to detect we are in dev container
|
||||||
|
ENV DEVCONTAINER=true
|
||||||
|
|
||||||
# Locale env vars
|
# Locale env vars
|
||||||
ENV \
|
ENV \
|
||||||
LANG=en_US.UTF-8 \
|
LANG=en_US.UTF-8 \
|
||||||
|
1
Rakefile
1
Rakefile
@ -89,6 +89,7 @@ end
|
|||||||
desc "preview the site in a web browser"
|
desc "preview the site in a web browser"
|
||||||
task :preview, :listen do |t, args|
|
task :preview, :listen do |t, args|
|
||||||
listen_addr = args[:listen] || '127.0.0.1'
|
listen_addr = args[:listen] || '127.0.0.1'
|
||||||
|
listen_addr = '0.0.0.0' unless ENV['DEVCONTAINER'].nil?
|
||||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||||
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
|
||||||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user