bundle exec middleman server ```でローカルサーバーが立ち上がるのですが、sass がコンパイルされていない状態です。 立ち上がった際のページのhead要素に`all.css`が入っているのですがコンパイル前の状態なので、おそらくsassからコンパイルが行われていないと予想しています。 CSSをあてたく、ご助言いただけないでしょうか。 Gemfile周りのファイルを下記に記載します。 ### config.rb
Compass
Change Compass configuration
compass_config do |config|
config.output_style = :compact
end
Page options, layouts, aliases and proxies
Per-page layout changes:
With no layout
page "/path/to/file.html", :layout => false
With alternative layout
page "/path/to/file.html", :layout => :otherlayout
page "/2020/*", layout: :"2020"
Proxy pages (http://middlemanapp.com/dynamic-pages/)
proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
:which_fake_page => "Rendering a fake page with a local variable" }
# Assumes the file source/presentations/template.html.haml exists
data.year_2020.presentations.except('lightning_talks').each do |id, presentation|
proxy "2020/presentations/#{id}.html", "2020/presentations/template.html", locals: { presentation: presentation }, ignore: true
end
Helpers
set :markdown_engine, :redcarpet
Automatic image dimensions on image_tag helper
activate :automatic_image_sizes
Reload the browser automatically whenever files change
activate :livereload
Methods defined in the helpers block are available in templates
helpers do
def some_helper
"Helping"
end
end
require "digest/md5"
helpers do
def imgset_tag(source, options = {})
srcset = source+".png 1x, "+source+"@2x.png 2x"
image_tag(source+".png", options.merge(srcset: srcset))
end
def avatar_image_tag(member, options = {})
options[:alt] = options.fetch(:alt, member.name)
image_tag(avatar_path(member), options)
end
def gravatar_image_tag(hash, options = {})
url = "https://www.gravatar.com/avatar/#{hash}?s=268&d=https%3A%2F%2Frubykaigi.org%2F2020%2Fimages%2Fspeakers%2Fdummy-avatar.png"
image_tag(url, options)
end
def get_current(link)
re = ''
if '/'+current_page.path.gsub('.html', '') == link
re = 'is-current'
end
return re
end
private def avatar_path(member)
local_image = "team/#{member.id}.jpg"
return local_image if File.exist?(File.join(root, config[:source], asset_path(:images, local_image)))
default_image = "sushidot_maguro.png" return default_image unless member.email id = Digest::MD5.hexdigest(member.email.downcase) "https://secure.gravatar.com/avatar/#{id}?s=268"
end
end
activate :sprockets
activate :directory_indexes
redirect "2020/code-of-conduct.html", to: "2020/policies.html"
set :css_dir, '2020/stylesheets'
set :js_dir, '2020/javascripts'
set :images_dir, '2020/images'
set :fonts_dir, '2020/fonts'
Build-specific configuration
configure :build do
For example, change the Compass output style for deployment
activate :minify_css
Minify Javascript on build
activate :minify_javascript
Enable cache buster
activate :asset_hash
Use relative URLs
activate :relative_assets
Or use a different image path
set :http_prefix, "/Content/images/"
end
### Gemfile
source 'https://rubygems.org'
gem 'middleman', '> 4.2'> 2.7'
gem 'middleman-autoprefixer', '
gem 'middleman-sprockets'
gem 'redcarpet'
gem 'sass'
gem 'sprockets'
Live-reloading plugin
gem "middleman-livereload"
group :production do
gem 'rack-contrib'
gem 'thin'
end
group :development do
gem 'pry'
end
gem 'rake'
### Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
activesupport (5.0.7.2)
concurrent-ruby (> 1.0, >= 1.0.2)> 5.1)
i18n (>= 0.7, < 2)
minitest (
tzinfo (> 1.1)> 0.6.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.7.1)
execjs
backports (3.15.0)
coderay (1.1.2)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
contracts (0.13.0)
daemons (1.3.1)
dotenv (2.7.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (
erubis (2.7.0)
eventmachine (1.2.7)
execjs (2.7.0)
fast_blank (1.0.0)
fastimage (2.1.7)
ffi (1.11.1)
haml (5.1.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (> 1.0)> 1.0)
hashie (3.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (
kramdown (1.17.0)
listen (3.0.8)
rb-fsevent (> 0.9, >= 0.9.4)> 0.9, >= 0.9.7)
rb-inotify (
memoist (0.16.0)
method_source (0.9.2)
middleman (4.3.5)
coffee-script (> 2.2)> 1.2)
haml (>= 4.0.5)
kramdown (
middleman-cli (= 4.3.5)
middleman-core (= 4.3.5)
middleman-autoprefixer (2.10.1)
autoprefixer-rails (> 9.1)> 2.3)
middleman-core (>= 3.3.3)
middleman-cli (4.3.5)
thor (>= 0.17.0, < 2.0)
middleman-core (4.3.5)
activesupport (>= 4.2, < 5.1)
addressable (
backports (> 3.6)> 0.13.0)
bundler
contracts (
dotenv
erubis
execjs (> 2.0)> 2.0)
fast_blank
fastimage (
hamster (> 3.0)> 3.4)
hashie (
i18n (> 0.9.0)> 3.0.0)
listen (
memoist (> 0.14)> 0.13.0)
padrino-helpers (
parallel
rack (>= 1.4.5, < 3)
sassc (> 2.0)> 2.0.9)
servolux
tilt (
uglifier (> 3.0)> 0.5.1)
middleman-livereload (3.4.6)
em-websocket (
middleman-core (>= 3.3)
rack-livereload (> 0.3.15)> 4.0)
middleman-sprockets (4.1.1)
middleman-core (
sprockets (>= 3.0)
minitest (5.13.0)
padrino-helpers (0.13.3.4)
i18n (> 0.6, >= 0.6.7)> 1.1.0)
padrino-support (= 0.13.3.4)
tilt (>= 1.4.1, < 3)
padrino-support (0.13.3.4)
activesupport (>= 3.1)
parallel (1.18.0)
pry (0.12.2)
coderay (
method_source (> 0.9.0)> 2.0)
public_suffix (4.0.1)
rack (2.0.7)
rack-contrib (2.1.0)
rack (
rack-livereload (0.3.17)
rack
rake (13.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (> 1.0)> 4.0.0)
redcarpet (3.5.0)
sass (3.7.4)
sass-listen (
sass-listen (4.0.0)
rb-fsevent (> 0.9, >= 0.9.4)> 0.9, >= 0.9.7)
rb-inotify (
sassc (2.2.1)
ffi (> 1.9)> 1.0)
servolux (0.13.0)
sprockets (4.0.0)
concurrent-ruby (
rack (> 1, < 3)
temple (0.8.2)
thin (1.7.2)
daemons (> 1.0, >= 1.0.9)> 1.0, >= 1.0.4)
eventmachine (
rack (>= 1, < 3)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
PLATFORMS
ruby
DEPENDENCIES
middleman (> 4.2)> 2.7)
middleman-autoprefixer (
middleman-livereload
middleman-sprockets
pry
rack-contrib
rake
redcarpet
sass
sprockets
thin
BUNDLED WITH
2.0.2
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。