Skip to content

Commit

Permalink
refactor: change SSG to Zola (#1)
Browse files Browse the repository at this point in the history
* ci: disable action as it will need a rework

* refactor: change SSG to Zola

* ci: set up action for Zola
  • Loading branch information
WerySkok authored Sep 22, 2024
1 parent f854255 commit 7aa6938
Show file tree
Hide file tree
Showing 37 changed files with 422 additions and 664 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🚀 Build and deploy website on push
# name: 🚀 Build and deploy website on push
on:
push:
branches:
Expand All @@ -10,31 +10,19 @@ jobs:
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: 📦 Use cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- name: 🔧 Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: 🛠️ Setup Ruby
uses: ruby/setup-ruby@v1
- name: 🛠️ Setup Zola
uses: taiki-e/install-action@v2
with:
ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
tool: [email protected]
- name: 🏗️ Build website with Jekyll
run: JEKYLL_ENV=production bundle exec jekyll build
run: zola build
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_WEB_SERVER }}
username: ${{ secrets.FTP_USER_NAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./_site/
local-dir: ./public/
server-dir: /www/weryskok.ru/
exclude: |
**/.git*
Expand Down
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# Ignore metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/
# Ignore folder generated by Zola
public/
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

15 changes: 0 additions & 15 deletions Gemfile

This file was deleted.

93 changes: 0 additions & 93 deletions Gemfile.lock

This file was deleted.

11 changes: 4 additions & 7 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
This repo contains source code for [weryskok.ru](https://weryskok.ru).

## What tools are used?
* [Jekyll](https://jekyllrb.com/) as static site generator
* [Zola](https://www.getzola.org/) as static site generator
* [Darkly Bootstrap](https://bootswatch.com/darkly/) for components to build this site

## How to build this site?
1. Install ``nodejs``, ``ruby`` and ``rubygems``.
1. ``gem install bundler``.
1. Add gems dir to path.
1. ``git clone https://github.com/WerySkok/weryskok.ru.git && cd weryskok.ru``
1. ``bundle install``
1. ``JEKYLL_ENV=production bundle exec jekyll build``
1. [Install Zola](https://www.getzola.org/documentation/getting-started/installation/).
2. ``git clone https://github.com/WerySkok/weryskok.ru.git && cd weryskok.ru``
3. ``zola build``

## Why not GitHub Pages?
Am lazy.
12 changes: 0 additions & 12 deletions _config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions _includes/header-en.html

This file was deleted.

63 changes: 0 additions & 63 deletions _layouts/default.html

This file was deleted.

21 changes: 21 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The URL the site will be built for
base_url = "https://weryskok.ru"

# Whether to automatically compile all Sass files in the sass directory
compile_sass = false

# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false

default_language = "ru"

[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = false

[languages.en]

[extra]
# Put all your custom variables here
navigation = [{ name = "Блог", link = "https://blog.weryskok.ru" }]
7 changes: 3 additions & 4 deletions en/index.html → content/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default-en
title: Main
---
+++
title = "Main"
+++

<section class="d-flex align-items-center justify-content-center vh-100">
<!-- it took a lot of tears on this part, pls help -->
Expand Down
10 changes: 4 additions & 6 deletions index.html → content/_index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
layout: default
title: Главная
---

+++
title = "Главная"
+++
<section class="d-flex align-items-center justify-content-center vh-100">
<!-- на этот блок ушло много слёз, помогите -->
<div class="row justify-content-center me-0">
Expand Down Expand Up @@ -565,4 +563,4 @@ <h1 class="display-5 mb-4">Вики-сайты</h1>
</div>
</div>
</div>
</section>
</section>
4 changes: 4 additions & 0 deletions content/lol.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
+++
title = "lol"
+++
lol
Loading

0 comments on commit 7aa6938

Please sign in to comment.