SASS in Octopress - sass

My sass folder can not render screen.css when I rake generate, I don't know why, but it happens since I updated octopress, so, everytime I deploy my blog, I have to do the following steps:
go to _deploy and do git pull origin master
go back to root folder and do rake generate and rake deploy, after that,
go to my github repo, and manually edit stylesheets\screen.css to the previous version.
So, actually I have two questions:
How to add .stylesheets\screen.css in _deploy folder? (I rarely change the stylesheet, though..)
How to fix the "sass generator" so, it can work normally again?
Thank you..

Review your Rakefile and the code under task :generate do. It should be compiling the css file like system "compass compile -css dir #{source_dir}/stylesheets"

Related

GO API installation fails "evq/chromaticity"

I am trying to install chromaticity on my own machine for testing, and no matter what i do i will always hit the error seen in this picture installation error
I dont know why it happened i tried searching but i found nothing online. my question is does anyone know why it happens? or can point me to the right direction? i have checked the folders and yes there are no GO files in there but i dont see why that is a problem
The api could be found here: https://github.com/evq/chromaticity
This is not an issue (as in bug) on the project, rather an issue due to lack of documentation on how to build the project itself.
If you look at the Makefile file on the root directory, you'll notice that static/static.go is a generated file as part of the build process. Such file is usually not committed to the repo so you'll need to build it yourself. To do so, you'll need to have go-bindata installed.
Here's what you need to do in order to build the project successfully:
Get the go-bindata package
go get -u github.com/jteeuwen/go-bindata/...
Get the project
go get github.com/evq/chromaticity
Go the project root directory
cd [...the chromaticity project root..]
Run make to generate the static/static.go file
make
Build/ install the project
go install
Update:
Noticed from your screenshot that you're using Windows, in that case you may need to workaround the issue of running Makefile in Windows. See here for possible solution: How to run a makefile in Windows?
I've run into the same issue when trying to "get" and then install this project. I looked into the code and there is no trace of Asset() function in github.com/evq/chromaticity/static. Moreover git history does not show any .go files in static/ directory. Personally, I would create issue in the project and/or look for different repo containing desired functionality.

Ext-Tidy on Heroku

I'm trying to get the PHP Tidy extension to run on my Heroku instance that I've set up. I've added ext-tidy to my composer.json file and run composer update to update the composer.lock file.
However when I push the changes to Heroku, the build fails as the Heroku buildpack doesn't include the Tidy extension.
Is there a way to get Composer to bundle the Tidy extension so that it gets pushed to Heroku (I'm using a Windows machine so I don't know if this will complicate matters if it is possible)? Or do I need to create a new buildpack with Tidy integrated? If so, I'd appreciate it if someone could point me in the right direction to be able to do this.
Thanks.

unrequired files in github pages through jekyll

I'm fairly new to ruby and jekyll and I wanna start using jekyll to meu personal webpage. Among the files in my repo there is a'Gemfile' and 'Gemfile.lock' files.
The Gemfile is used to manage dependencis and Gemfile.lock is generated through
bundle install
Is any of them required to be in the repo, or does gh-pages overrides any definitions contained in those files?
Other contained folder is '.sass-cache'. From this question I get the impression that it's used for caching issues. Once again, is it required, or gh-pages generates those files itself?
You can version your Gemfile. This can be useful for a reinstall. gemfile.lock and .sass-cache are not necessary to push to Github. They are used locally.
If your Gemfile contains something other than:
source 'https://rubygems.org'
gem 'github-pages'
That certainly means that you use plugins that are not supported by Github (see supported plugins list here). You then need to generate your site locally and push the result to your Github.
I've described a workflow here and you can also have a look at Octopress rake file that can help for such a setup (need small hacks to be used on a basic Jekyll install).
From my interpretation of the docs, github simply uses their own github-pages gem to pull in dependencies and then runs jekyll serve on your repo.
One consequence of that is that your gemfile (and thus any gems not part of github-pages) is ignored. For example, I use jekyll-less to generate my CSS but since this is not part of github-pages, making CSS changes is a multi-step process for me:
Update .less files
Build
Copy compiled CSS out of _site
Commit .css changes
Push
Another consequence is that any run-time or build-time stuff you use is ignored by github, so your .sass-cache directory does not need to be added to the repo.

Font Awesome working locally, but not on Heroku

So I Installed the font-awesome gem and everything looks good, using the latest version etc.
Also included in my application.css:
*= require font awesome
When I view from local it turns out fine and the glyph-icons show up. When I upload it to heroku, the icons do not show up. I originally had the block squares show up but managed to fix it as I had some messy code in my stylesheets.
What am I doing wrong or what am I missing?
Had the same issue and resolved it (in Rails 4) using info from the following two sources: Rails Asset Pipeline and Rails Asset Pipeline for Heroku
"With the asset pipeline, the preferred location for these assets is now the app/assets directory". Move the fonts folder for font-awesome into app/assets and the font awesome js and css files into vendor/assets or app/assets appropriate javascripts and stylesheets folders.
Now you need to compile the assets for production, run:
$ rake assets:precompile
$ RAILS_ENV=production bundle exec rake assets:precompile
$ git add public/assets
$ git commit -m "vendor compiled assets"
Then push to heroku
$ git push heroku master
Hopefully this helps someone else who stumbles upon this question.

Where does COMPASS expect to find the config.rb (if there are several)?

I'm introducing COMPASS to a project where we have different development branches from a SVN versioned web project in different folders for development. So we'll need to have several config.rb copies - the config.rb should be in trunk and thus in every branch we check out from SVN. How can I switch from "watching" the SASS directory in one branch checked out on my computer to watching another SASS directory in another branch checked out?!
Since the directory names for the checked out branched change with every new branch, having just one config.rb for COMPASS outside of / at the root directory of all branch directories is not an optimal solution since then we'd have to update every local config.rb on every developers computer with every new branch checked out...
Do I simply start "compass watch" in every branch's styles directory when working within that branch? Will there then be several COMPASS instances running, watching all the different branches?
I didn't find any answer to this problem on the internet, so I hope to find one here. Any idea welcome!
Cheers, Roman.
You can precise the location of the configuration file with the -c command line argument: compass watch -c custom/folder/config.rb. But be careful, all paths to match the configuration variables (sass_dir, css_dir, etc) depend on the initial path where the command Compass is launched. For example, you can place in a branch and point the configuration file present in the trunk.
However, the easiest way would be to have a configuration file by branch and start the compilation in each of them.

Resources