Aprendizaje y Enseñanza de la Tecnología

Desarrollo Colaborativo de Proyectos de Aprendizaje y Enseñanza de Tecnologías en la Nube


Organization ULL-MFP-AET-2122   Github Classroom ULL-MFP-AET-2122   Campus Virtual AET   Chat Chat   Profesor Casiano

Clase del Jueves 18/11/2021

Tareas en curso

En la clase de hoy seguiremos con las siguientes tareas:

La rama siempre en el prompt

PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)") $ '

Tarea Generating a Web Site with a Static Generator

Ya vamos terminando con la tarea Generating a Web Site with a Static Generator

Despliegue / Deployment en GitHub

.nojekyll

Recuerda añadir .nojekyll a la carpeta _site. Véase https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/

Simplificar el Despliegue

Para simplificar las tareas de despliegue, sobreescriba los contenidos del Rakefile de su workspace con este código:

desc "Remember to set my login in github"
task :remember do
  puts "Remember to set the environment variable 'login' in your shell before start!\nWrite this command:\n\teval $(gp env -e login=<your login at github>)"
end

desc "Build and serve your website in folder _site. Use: rake server[<portnumber>] otherwise a random port will be chosen"
task :serve, [:port] do |t, args|
  sh "bundle exec jekyll serve --port #{ args[:port] or Integer(1000+9000*rand())}"
end 

desc "Build your website in folder _site"
task :build do
  sh "bundle exec jekyll build"
end

desc "Watch changes and rebuild web site each time some change occurs"
task :bw do
  sh "bundle exec jekyll build --watch"
end 

desc "Makes the folder '_site' a repo. Use: rake setup[aluXXXX]"
task :setup => [:clean_site, :build] do |t, args|
  sh "cd _site && git init . && git config --global init.defaultBranch master && git add -f . && git remote add origin https://github.com/#{ENV["login"]}/#{ENV["login"]}.github.io"
end

desc "Removes everything inside the folder _site"
task :clean_site do 
  sh "rm -fR _site"
end

task :clean => [:clean_site]

desc "Deploy all the files inside _site to GitHub. Assumes _site is already a repo"
task :deploy => [:setup] do 
  sh "cd _site && git add -f . && git commit -am new-deploy && git push -fu origin master"
end
 
desc "Deploy your web site to github and push the changes in the root repo"
task :default => :deploy do
  sh "git add .; git commit -am new-version; git push -u origin master"
end

Este Rakefile tiene varias tareas. Una de ellas se llama remember:

gitpod /workspace/static-generator-casiano-rodriguez-alumnoudv5 $ rake remember
Remember to set the environment variable 'login' in your shell before start!
Write this command:
        eval $(gp env -e login=<your login at github>)

Esta tara le recurda que para que las cosas funcionen debe escribir en la shell:

gitpod /workspace/static-generator-casiano-rodriguez-alumnoudv5 $ eval $(gp env -e login=casiano)
gitpod /workspace/static-generator-casiano-rodriguez-alumnoudv5 $ echo $login
casiano

deberá sustituir casiano por su usuario de GitHub. Si la variable de entorno se perdiera vuelva a ejecutar esta orden en la shell.

Despues de esto el despliegue se reduce a escribir rake deploy:

gitpod /workspace/static-generator-casiano-rodriguez-alumnoudv5 $ rake deploy
rm -fR _site
bundle exec jekyll build
Configuration file: /workspace/static-generator-casiano-rodriguez-alumnoudv5/_config.yml
            Source: /workspace/static-generator-casiano-rodriguez-alumnoudv5
       Destination: /workspace/static-generator-casiano-rodriguez-alumnoudv5/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
                    done in 0.261 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
cd _site && git init . && git config --global init.defaultBranch master && git add -f . && git remote add origin https://github.com/casiano/casiano.github.io
Initialized empty Git repository in /workspace/static-generator-casiano-rodriguez-alumnoudv5/_site/.git/
cd _site && git add -f . && git commit -am new-deploy && git push -fu origin master
[master (root-commit) f213d05] new-deploy
 20 files changed, 8285 insertions(+)
 create mode 100644 assets/css/main.css
 create mode 100644 assets/css/main.css.map
 create mode 100644 assets/js/lunr/lunr-en.js
 create mode 100644 assets/js/lunr/lunr-gr.js
 create mode 100644 assets/js/lunr/lunr-store.js
 create mode 100644 assets/js/lunr/lunr.js
 create mode 100644 assets/js/lunr/lunr.min.js
 create mode 100644 assets/js/main.min.js
 create mode 100644 banner.js
 create mode 100644 blog.html
 create mode 100644 blog/aet.html
 create mode 100644 calificaciones.csv
 create mode 100644 docencia.html
 create mode 100644 docencia/aet.html
 create mode 100644 feed.xml
 create mode 100644 index.html
 create mode 100644 robots.txt
 create mode 100644 set-github-token
 create mode 100644 sitemap.xml
 create mode 100644 staticman.yml
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 16 threads
Compressing objects: 100% (24/24), done.
Writing objects: 100% (28/28), 194.57 KiB | 5.90 MiB/s, done.
Total 28 (delta 5), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (5/5), done.
To https://github.com/casiano/casiano.github.io
 + 85585aa...f213d05 master -> master (forced update)
Branch 'master' set up to track remote branch 'master' from 'origin'.

La entrega

Recuerden poner en el repo de entrega los enlaces a los despliegues.

Otras Plataformas para Despliegues

Netlify

Netlify is another deploy platform. It allows to integrate dynamic functionality like serverless functions, user authentication, and form handling as your projects grow.

Vercel

Vercel is a platform for frontend frameworks and static sites, built to integrate with your headless content, commerce, or database.

Nueva Práctica: \(\LaTeX\) y MarkDown

Trabajo Final de la Parte Desarrollo Colaborativo de Proyectos de AET

Referencias

Jekyll Docs

Site Structure

Liquid

Themes

Pagination

Tutorials

Repl.it and Jekyll

Maths

Cheat Sheets

CV Examples

Favicon

Minimal Mistakes

Referencias de Prácticas Anteriores

Table of Contents

Your Comments