You can use the initpost.sh to create your new posts. Just follow the command:
./initpost.sh -c Post Title
The new file will be created at _posts with this format date-title.md.
When you create a new post, you need to fill the post information in the front-matter, follow this example:
---
layout: post
title: "Falando sobre RSCSS"
image: '/assets/img/rscss/rscss.png'
main-class: 'css'
tags:
- css
- metodologia
- frontend
categoriesintroduction: 'Escrevendo CSS sem perder a sanidade. Com essa introdução, Rico St. Cruz o criador chama a atenção de todos sobre uma metodologia melhor para se escrever CSS.'
---
PowerShell (run as administrator once to allow package installs):
# clone repo if you haven't already
# git clone https://github.com/rubygsoc/rubygsoc.github.io.git
Set-Location rubygsoc.github.io
npm run setup:local # installs tools, ruby gems and npm deps
npm run verify:local # sanity-check environment + security heuristicsIf you'd prefer to run the steps manually:
# install system tools via winget
winget install --id RubyInstallerTeam.RubyWithDevKit.3.3 --silent
winget install --id CoreyButler.NVMforWindows --silent
# open a new terminal after nvm installation, then:
nvm install 12.22.12
nvm use 12.22.12 # required for gulp@3 compatibility
ruby -v # should show a 3.x interpreter
gem install bundler jekyll # install jekyll locally
npm install # fetch Javascript dependencies
npx gulp js # build minified JS
npx gulp stylus # compile stylus -> css
jekyll build # generate the siteNote: the blog uses an old Gulp 3 pipeline which only works reliably with Node 12.22.12. You will need to switch to that version using
nvm use 12.22.12before running gulp tasks.
Two helper scripts have been added to catch common issues:
node .\scripts\check_search_json.js # warns if search.json output looks unsafe
node .\scripts\check_target_blank_rel.js . # ensure external links include rel noopener/noreferrerThey are invoked automatically by npm run verify:local.
If you see the following error during Linux setup:
Error: watch /path_to_folder/rubygsoc.github.io/src/styl/ ENOSPC
you need to increase system limit on the number of files you can monitor (Read more):
sudo sysctl fs.inotify.max_user_watches=524288
main-class is used to categorize projects. If you need a new main-class
- add it in
themesinsrc/styl/_theme-colors.styl:
themes = {
post-bundler: #0e8ab3,
post-jruby: #2DA0C3,
...
post-newclass: #hexcolor
}
- create a category template for your new main-class:
category/newclass.html