From e05c83378433e0e75ece0873b48e793ca3c41781 Mon Sep 17 00:00:00 2001 From: Gabriel Carneiro Date: Mon, 5 Aug 2024 21:27:49 -0300 Subject: [PATCH] remove aulas collection in favor of using plugin --- Gemfile | 18 +--- _config.yml | 33 ++++--- _data/aulas.json | 21 +++++ _includes/Pages/aulas.html | 7 +- _includes/Pages/index.html | 2 +- _layouts/aulas.html | 100 ++++++++-------------- _layouts/cursos.html | 6 +- _layouts/dashboard.php | 0 collections/_aulas/Introdução ao LMMS.md | 19 ---- collections/_aulas/Introdução ao Mixxx.md | 13 --- upload.php | 6 +- 11 files changed, 94 insertions(+), 131 deletions(-) create mode 100644 _data/aulas.json mode change 100644 => 100755 _layouts/dashboard.php delete mode 100755 collections/_aulas/Introdução ao LMMS.md delete mode 100755 collections/_aulas/Introdução ao Mixxx.md diff --git a/Gemfile b/Gemfile index 7062c08..6c664ad 100755 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ source "https://rubygems.org" # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! -gem "jekyll", "~> 4.3.2" +gem "jekyll" # This is the default theme for new Jekyll sites. You may change this to anything you like. # gem "minima", "~> 2.5" # If you want to use GitHub Pages, remove the "gem "jekyll"" above and @@ -15,21 +15,11 @@ gem "jekyll", "~> 4.3.2" # gem "github-pages", group: :jekyll_plugins # If you have any plugins, put them here! group :jekyll_plugins do - gem "jekyll-feed", "~> 0.12" + gem "jekyll-feed" + gem "jekyll-datapage-generator" gem "jekyll-archives" end - -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. -platforms :mingw, :x64_mingw, :mswin, :jruby do - gem "tzinfo", ">= 1", "< 3" - gem "tzinfo-data" -end - -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] - # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem # do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] +# gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] diff --git a/_config.yml b/_config.yml index fa2c39d..9b5e760 100755 --- a/_config.yml +++ b/_config.yml @@ -21,22 +21,23 @@ title: ALICE CAST description: >- # this means to ignore newlines until "baseurl:" Bem vindo ao sensacional site de cursos do Alice. -#baseurl: / # the subpath of your site, e.g. /blog +# baseurl: /~carneiro/aliceclass # the subpath of your site, e.g. /blog url: "https://cast.alice.ufsj.edu.br" # the base hostname & protocol for your site, e.g. http://example.com # Build settings #theme: minima plugins: - jekyll-feed + - jekyll-datapage-generator collections_dir: collections # collections collections: - aulas: - output: true - permalink: /:collection/:path + # aulas: + # output: true + # permalink: /:collection/:path software: output: true permalink: /:collection/:path @@ -50,15 +51,25 @@ collections: output: true permalink: /:collection/:name +page_gen-dirs: true + +page_gen: +- data: aulas + template: aulas + dir: aulas + index_files: false + name: title + debug: true + # collection default setup defaults: - - - scope: - path: "_aulas" - type: aulas - values: - layout: "aula" - author: "ALICE" + # - + # scope: + # path: "_aulas" + # type: aulas + # values: + # layout: "aula" + # author: "ALICE" - scope: path: "_autores" diff --git a/_data/aulas.json b/_data/aulas.json new file mode 100644 index 0000000..cebec79 --- /dev/null +++ b/_data/aulas.json @@ -0,0 +1,21 @@ +[ + { + "title": "Introdução ao LMMS", + "user": "fls", + "nome": "Flávio Luiz Schiavoni", + "description": "Bem-vindo ao curso de LMMS, uma ferramenta poderosa e gratuita para produção de música digital! Aqui, você aprenderá desde os conceitos básicos até técnicas avançadas para criar suas próprias músicas e beats.", + "date": "9/07/2024", + "software": ["lmms"], + "level": "Basico" + }, + { + "title": "Introdução ao MIxxx", + "user": "fls", + "author": "Flávio Luiz Schiavoni", + "description": "Bem-vindos ao curso de Mixxx, um software de DJ gratuito e de código aberto que permite que você crie sets incríveis e faça mixagens profissionais. Este curso é ideal para quem deseja começar na arte da discotecagem ou para DJs experientes que querem explorar uma nova ferramenta.", + "date": "09/07/2024", + "software": ["mixxx"], + "level": "Basico", + "layout": "aulas" + } +] diff --git a/_includes/Pages/aulas.html b/_includes/Pages/aulas.html index 8cc8b10..d6e078a 100755 --- a/_includes/Pages/aulas.html +++ b/_includes/Pages/aulas.html @@ -3,15 +3,14 @@

Aulas

- {% assign aulas = site.aulas | sort: 'date' | reverse %} + {% assign aulas = site.data.aulas | sort: 'date' | reverse %} {% assign max_aulas = 3 %} {% for aula in aulas %} - {% assign nome = aula.name | replace: ".md","" %}
- +
@@ -23,4 +22,4 @@ {% endfor %}
-
\ No newline at end of file + diff --git a/_includes/Pages/index.html b/_includes/Pages/index.html index 159813c..b2d04a6 100755 --- a/_includes/Pages/index.html +++ b/_includes/Pages/index.html @@ -10,7 +10,7 @@
- {% assign aulas = site.aulas | sort: 'date' | reverse %} + {% assign aulas = site.data.aulas | sort: 'date' | reverse %} {% assign max_aulas = 3 %} {% assign count = 0 %} diff --git a/_layouts/aulas.html b/_layouts/aulas.html index c6bf789..f6fd818 100755 --- a/_layouts/aulas.html +++ b/_layouts/aulas.html @@ -1,69 +1,43 @@ - - - - - - - - - {% if page.styles %}{{ page.styles }}{% endif %} - - {% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %} - +--- +layout: default +lang: pt +--- - - - -
-
- {% include SideBar.html %} -
-
-
- {% include TopBar.html %} -
+
+
+
-
-
-
-

{{ page.title }}

-

{{ page.software }} - {{ page.level }}

+
+
+
+

{{ page.title }}

+

{{ page.software }} - {{ page.level }}

-

{{ page.author }}

-

{{ page.date | date: "%d/%m/%Y" }}

-
+

{{ page.author }}

+

{{ page.date | date: "%d/%m/%Y" }}

+
-
- {% assign aula_name = page.name | replace: '.md', '' %} - {% assign zip_file = 'aulas/' | append: aula_name | append: '.zip' %} - - Download - -
-
-
- -
- {% assign aula_slug = page.name | replace: '.md', '' %} - {% assign video_aula = '' | append: aula_slug | append: '.mp4' %} - -
- -
-

{{ page.content }}

-
-
- - - +
+ {% assign aula_name = page.name | replace: '.md', '' %} + {% assign zip_file = 'aulas/' | append: aula_name | append: '.zip' %} + + Download + +
-
-
- -
- - + +
+ {% assign aula_slug = page.name %} + {% assign video_aula = '' | append: aula_slug | append: '.mp4' %} + +
+ +
+
+ +
+
diff --git a/_layouts/cursos.html b/_layouts/cursos.html index 1472d7c..76ef7ae 100755 --- a/_layouts/cursos.html +++ b/_layouts/cursos.html @@ -15,7 +15,7 @@ - {% assign aulas = site.aulas | sort: 'date' | reverse %} + {% assign aulas = site.data.aulas | sort: 'date' | reverse %}