diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8f956b87f42f78a3928fcc792afa8f362752903f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..841fcb2018a82e7305e2ea2776d268305be4f13e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: python:3.9-buster + +before_script: + - pip install -r requirements.txt + +test: + stage: test + script: + - mkdocs build --verbose --site-dir test + artifacts: + paths: + - test + except: + - master + +deploy: + stage: deploy + only: + - master + script: + - mkdocs build --site-dir public + - echo "build" + artifacts: + paths: + - public + expire_in: 10 mins + + + + + + + + + + diff --git a/README.md b/README.md index 58423a1217cebf5cbf7c6c52498b91682bf12012..6d29c7de6c68da38e85757d7d4831a417b761391 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,15 @@ -# plantillaMkDocs +# Plantilla MkDocs +## Building locally +To work locally with this project, you'll have to follow the steps below: -## Getting started +1. Fork, clone or download this project +1. [Install][] MkDocs +1. Preview your project: `mkdocs serve`, + your site can be accessed under `localhost:8000` +1. Add content +1. Generate the website: `mkdocs build` (optional) -To make it easy for you to get started with GitLab, here's a list of recommended next steps. +Read more at MkDocs [documentation][]. -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://gitmilab.redclara.net/hackathon-bella/plantillamkdocs.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://gitmilab.redclara.net/hackathon-bella/plantillamkdocs/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. diff --git a/docs/images/cyted1.png b/docs/images/cyted1.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ecdb61d1e22f132dbbd6261c6445405cd9ad0d Binary files /dev/null and b/docs/images/cyted1.png differ diff --git a/docs/images/upload.png b/docs/images/upload.png new file mode 100644 index 0000000000000000000000000000000000000000..c5d8ce67392e7cf8a2ae25a672313ac2e464264e Binary files /dev/null and b/docs/images/upload.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000000000000000000000000000000000..bc550fefe77c4538a317b4eb76bc57757e284ff6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,156 @@ +# Creación de cursos con MkDocs + +Este es un curso en el servicio [MiLab Pages](https://milab.redclara.net/). Puede revisar su [código fuente](https://gitlab.com/pages/mkdocs) y solicitar un despliegue nuevo con esta plantilla para sus proyectos llenando el siguiente formulario: [https://forms.gle/y33t6xb1vSKXQV4n8](https://forms.gle/y33t6xb1vSKXQV4n8). + +## Tutorial de edición + +> Esta plantilla se edita en formato MarkDown, puede usar la guÃa creada por [Matt Cone](https://github.com/mattcone) para conocer su sintaxis en [GuÃa rápida MarkDown](https://www.markdownguide.org/cheat-sheet/) + +Para la edición de los cursos se debe seguir estos pasos: + +1. Dirigirse al repositorio del curso. Por ejemplo https://gitmilab.redclara.net/cyted/course1 +2. Ingresar al editor web dando clic al botón **Web IDE** + +1. Para editar archivos existentes, localizarlos en la carpeta `docs/` y realizar las ediciones necesarias. +2. Para nuevas paginas: + 1. Se debe crear un nuevo archivo con extensión `.md` en el directorio `docs/`. Ejemplo `docs/documentacion.md` + 2. Se debe agregar al menú desde el archivo `mkdocs.yml` en la sección `nav:` siguiendo el formato: + + ``` + nav: + - TÃtulo: docs/archivo.md + ``` + +3. Se pueden agregar imagenes, documentos o cualquier material complementario cargandolos desde el editor en el Ãcono  +4. Para guardar los cambios: + 1. Se da clÃc al botón **Create Commit** + 2. Se agrega una descripción de los cambios en el campo *Commit message*. + > Una frase corta que describe a grandes rasgos las mejoras añadidas + 3. Se selecciona, Commit to **master** branch. + 4. Se da clic al botón **Commit** + +> A partir del commmit los cambios se reflejarán en la versión web en aproximadamente 5 minutos. + + +## Tutorial MarkDown + +A continuación, presentamos una guÃa rápida sobre cómo escribir en Markdown. Si deseas obtener más información sobre la sintaxis de Markdown, consulta la hoja de trucos creada por Matt Cone, en este enlace: [Hoja de trucos MarkDown](markdown.md) + +> Como regla general, es importante dejar una linea en blanco entre cada par de bloques del texto. + +### TÃtulos + +Los encabezados se escriben con el sÃmbolo "#" al inicio de la lÃnea, seguido del texto del encabezado. El número de "#" indica el nivel del encabezado (1 para el encabezado principal, 2 para el subencabezado, y asà sucesivamente). Por ejemplo, la parte inicial de esta pagina se escribió de la siguiente manera: +``` +# Creación de cursos con MkDocs + +Este es un curso en el servicio ... + +## Tutorial de edición +``` + +### Párrafos + +Para escribir un párrafo, simplemente escribe el texto en una o varias lÃneas separadas por una lÃnea en blanco. + + +### Negrita y cursiva + +Para escribir en negrita, utiliza doble asterisco "**" al inicio y final del texto. Para escribir en cursiva, utiliza un solo asterisco "*". Ejemplo: + +`Esto es **negrita** y esto es *cursiva*.` + +Esto es **negrita** y esto es *cursiva*. + +### Listas + +Para escribir una lista con viñetas, utiliza el sÃmbolo "-" o "*" al inicio de cada elemento de la lista. Para escribir una lista numerada, utiliza números seguidos de un punto ".". Ejemplo: + +``` +Viñetas + +- Elemento 1 +- Elemento 2 +- Elemento 3 + +Numerada + +1. Elemento 1 +2. Elemento 2 +3. Elemento 3 +``` +Viñetas + +- Elemento 1 +- Elemento 2 +- Elemento 3 + +Numerada + +1. Elemento 4 +2. Elemento 5 +3. Elemento 6 + +### Enlaces + +Para crear un enlace, coloca el texto que quieres que se muestre entre corchetes "[]", y luego el enlace entre paréntesis "()". Ejemplo: + +`Esto es un enlace: [Google](https://www.google.com)` + +Esto es un enlace: [Google](https://www.google.com) + +### Imágenes + +Para insertar una imagen, utiliza la misma sintaxis que para crear un enlace, pero precede el texto con un signo de exclamación "!". Ejemplo: + +`` + + + +> Puedes usar un enlace url a la imagen (como en la anterior) o la ruta del archivo en el repositorio. Ejemplo `` para una imagen local  + +> **Nota.** Las imágenes en lÃnea al texto, si se quiere alinear o aplicar otro tipo de estilo se puede hacer con bloques *HTML*. + +### Citas o Notas + +Para citar un texto o dejar notas, utiliza el sÃmbolo ">" al inicio de cada lÃnea de la cita. Ejemplo: + +`> Esto es un texto citado.` + +> Esto es un texto citado. + +### Bloques de Código + +Para escribir segmentos de código en el texto, utiliza el sÃmbolo \` al inicio y final del código como en `print("Hola, mundo")`. Para escribir bloques de código, utiliza tres comillas invertidas al inicio y final del bloque. Ejemplo: + +``` +\``` +print("Hola, mundo") +print("Hola, mundo") +\``` +``` + +``` +print("Hola, mundo") +print("Hola, mundo") +``` + + +### Tablas + +Para escribir una tabla, utiliza barras verticales "|" para separar las columnas, y guiones "-" para separar la primera fila (que contiene los tÃtulos de las columnas) del resto de las filas. Ejemplo: + +``` +|TÃtulo 1 |TÃtulo 2| +|-----------|--------| +|Celda 1 |Celda 2| +|Celda 3 |Celda 4| +``` + +|TÃtulo 1 |TÃtulo 2| +|-----------|--------| +|Celda 1 |Celda 2| +|Celda 3 |Celda 4| + + +Actualización Julio 2023 \ No newline at end of file diff --git a/docs/markdown.md b/docs/markdown.md new file mode 100644 index 0000000000000000000000000000000000000000..62c3729dfb350578a982a02a2f5f7f5a1819e322 --- /dev/null +++ b/docs/markdown.md @@ -0,0 +1,171 @@ +--- +layout: default +title: Markdown Cheat Sheet +description: A quick reference to the Markdown syntax. +last_modified_at: 2021-12-05 +--- + +# MarkDown GuÃa Rápida + +> Material adaptado de https://github.com/mattcone/markdown-guide Creado por [Matt Cone](https://github.com/mattcone) bajo licencia CC BY-SA 4.0 + +## Overview + +Esta hoja de trucos de Markdown proporciona una rápida visión general de todos los elementos sintácticos de Markdown. No puede cubrir todos los casos extremos, asà que si necesitas más información sobre alguno de estos elementos, consulta las guÃas de referencia de sintaxis básica y sintaxis extendida. + +## Sintaxis básica + +Estos son los elementos descritos en el documento de diseño original de John Gruber. Todas las aplicaciones Markdown soportan estos elementos. + +<table class="table table-bordered"> + <thead class="thead-light"> + <tr> + <th>Elemento</th> + <th>Sintaxis MarkDown</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="/basic-syntax/#headings">TÃtulos</a></td> + <td><code># H1<br> + ## H2<br> + ### H3</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#bold">Negrita</a></td> + <td><code>**Texto negrita**</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#italic">Cursiva</a></td> + <td><code>*Texto en cursiva*</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#blockquotes-1">Cita en bloque</a></td> + <td><code>>Cita en bloque</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#ordered-lists">Lista ordenada</a></td> + <td><code> + 1. Primer Ãtem<br> + 2. Segundo Ãtem<br> + 3. Tercer Ãtem<br> + </code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#unordered-lists">Lista no ordenada</a></td> + <td> + <code> + - Primer Ãtem<br> + - Segundo Ãtem<br> + - Tercer Ãtem<br> + </code> + </td> + </tr> + <tr> + <td><a href="/basic-syntax/#code">Bloques de código</a></td> + <td><code>`código`</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#horizontal-rules">LÃnea horizontal</a></td> + <td><code>---</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#links">Enlace</a></td> + <td><code>[TÃtulo](https://www.example.com)</code></td> + </tr> + <tr> + <td><a href="/basic-syntax/#images-1">Imagen</a></td> + <td><code></code></td> + </tr> + </tbody> +</table> + +## Sintaxis ampliada + +Estos elementos amplÃan la sintaxis básica añadiendo caracterÃsticas adicionales. No todas las aplicaciones Markdown admiten estos elementos. + +<table class="table table-bordered"> + <thead class="thead-light"> + <tr> + <th>Element</th> + <th>Markdown Syntax</th> + </tr> + </thead> + <tbody> + <tr> + <td><a href="/extended-syntax/#tables">Table</a></td> + <td><code> + | Sintaxis | Descripción |<br> + | ----------- | ----------- |<br> + | TÃtulo | TÃtulo |<br> + | Párrafo | Texto | + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#fenced-code-blocks">Bloque de código</a></td> + <td><code>```<br> + {<br> + "firstName": "John",<br> + "lastName": "Smith",<br> + "age": 25<br> + }<br> + ``` + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#footnotes">Nota a pie de página</a></td> + <td><code> + He aquà una frase con una nota a pie de página. [^1]<br><br> + [^1]: Esta es la nota a pie de página. + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#heading-ids">Identificador de TÃtulo</a></td> + <td><code>### TÃtulo {#custom-id}</code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#definition-lists">Definition List</a></td> + <td><code> + term<br> + : definition + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#strikethrough">Tachado</a></td> + <td><code>~~Tachado.~~</code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#task-lists">Lista de tareas</a></td> + <td><code> + - [x] Tarea 1<br> + - [ ] Tarea 2<br> + - [ ] Tarea 3 + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#emoji">Emoji</a><br>(Ver <a href="/extended-syntax/#copying-and-pasting-emoji">Copiar y pegar emoji</a>)</td> + <td><code> + Qué gracioso.! :joy: + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#highlight">Resaltar</a></td> + <td><code> + Tengo que destacar estas ==palabras importantes==. + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#subscript">SubÃndice</a></td> + <td><code> + H~2~O + </code></td> + </tr> + <tr> + <td><a href="/extended-syntax/#superscript">SuperÃndice</a></td> + <td><code> + X^2^ + </code></td> + </tr> + </tbody> +</table> + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000000000000000000000000000000000000..94c621599152b73c6c53134747537d017f936826 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,14 @@ +site_name: Plantilla MkDocs +site_url: https://class.redclara.net/bella/ +site_dir: public + +# Repository +repo_name: hackathon-bella +repo_url: https://gitmilab.redclara.net/hackathon-bella + +theme: + name: material + +nav: + - Home: index.md + - MarkDown Cheat-Sheet: https://www.markdownguide.org/cheat-sheet/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..05301fa0b0017df25bb67a5db512fcff59221158 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,19 @@ +# Documentation static site generator & deployment tool + +# Add your custom theme if not inside a theme_dir +# (https://github.com/mkdocs/mkdocs/wiki/MkDocs-Themes) +# mkdocs-material>=5.4.0 + +mkdocs-material +jinja2>=3.0 +markdown>=3.2 +mkdocs>=1.4.2 +mkdocs-material-extensions>=1.1 +pygments>=2.14 +pymdown-extensions>=9.9 +mkdocs-minify-plugin + +# Requirements for plugins +colorama>=0.4 +regex>=2022.4.24 +requests>=2.26