Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,53 @@ categoriesintroduction: 'Escrevendo CSS sem perder a sanidade. Com essa introdu

## Running the blog in local

In order to compile the assets and run Jekyll on local you need to follow those steps:
### Windows quick setup

- Install [NodeJS](https://nodejs.org/) (remember to use the latest version)
- Run `sudo npm install`
- Run `sudo npm install -g gulp gulp-cli`
- Run `sudo gulp`
PowerShell (run as administrator once to allow package installs):

```powershell
# 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 heuristics
```

If you'd prefer to run the steps manually:

```powershell
# 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 site
```

> **Note:** 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.12` before running gulp tasks.

### Security verification

Two helper scripts have been added to catch common issues:

```powershell
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/noreferrer
```

They are invoked automatically by `npm run verify:local`.

If you see the following error during Linux setup:

If you see following error:
> 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](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers)):
Expand Down
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<footer>
<p>Made with <a href="http://jekyllrb.com/" target="_blank">Jekyll</a>
<p>Made with <a href="http://jekyllrb.com/" target="_blank" rel="noopener noreferrer">Jekyll</a>
</footer>
<script src="{{ "/assets/js/main.js" | prepend: site.baseurl }}"></script>
4 changes: 2 additions & 2 deletions assets/js/main.js

Large diffs are not rendered by default.

Loading