Skip to content

Commit

Permalink
Merge pull request #555 from andoresuperesu/fix-contribuir
Browse files Browse the repository at this point in the history
Fix contribuir
  • Loading branch information
pyjavo authored Sep 27, 2024
2 parents a25d758 + 6a0a734 commit b2eda71
Show file tree
Hide file tree
Showing 19 changed files with 310 additions and 65 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
171 changes: 170 additions & 1 deletion content/blog/contribuir-blog-python-barranquilla/contents+en.lr
Original file line number Diff line number Diff line change
@@ -1 +1,170 @@
_discoverable: no
_discoverable: no
---
body:


In the following article, I will talk about how to contribute to the Python Barranquilla blog. To collaborate on the community blog, you need to have prior knowledge in:
- [Lektor](#annex-1-how-to-install-lektor)
- [Git and Github](#annex-2-contribution-workflow-on-github)
- [Markdown](https://guides.github.com/features/mastering-markdown/)
- virtualenvs (this is optional).

The content of this article is divided into 2 important sections:

1. How to use the Lektor admin panel
2. How to make a Pull Request (or PR, as it's commonly known) to the PyBAQ repository.

With this clear, let's start detailing the step-by-step of each section.

## How to use the Lektor admin panel

### Clone repository

Editing the Python Barranquilla website can be done in a graphical panel. To run it, you need to clone [the project of our website](https://github.com/PyBAQ/django-quilla-web/blob/master/README.md) and install it locally using:

```bash
git clone https://github.com/PyBAQ/django-quilla-web.git
```

Once you have cloned the repository and [installed Lektor on your computer](https://www.getlektor.com/docs/installation/), you should run the local server using `lektor server -f webpack`.

![Clone repository console](/img/posts/2017/contribuir-pybaq/ejecutar.png)


### Creating an entry in Lektor

Now, go to the URL [http://localhost:5000](http://localhost:5000), and you will see the website in your browser.

![Home page](/img/posts/2017/contribuir-pybaq/home.png)

Navigate to the page you want to edit; in our case, navigate to the blog and press the edit button.

![Blog page](/img/posts/2017/contribuir-pybaq/pagina_blog.png)

Then go to the upper right corner and press a pencil-shaped button.

![Edit button](/img/posts/2017/contribuir-pybaq/boton_editar.png)

By pressing the button, the admin panel will load to edit the blog page.

![Edit blog](/img/posts/2017/contribuir-pybaq/editar_blog.png)

To proceed with creating the entry, enter the title and the [slug](https://yoast.com/slug/)

![Create entry](/img/posts/2017/contribuir-pybaq/crear_entrada.png)

Then complete the rest of the information

![Edit entry](/img/posts/2017/contribuir-pybaq/editar_entrada.png)

**Title:** Refers to the entry's title.

**Author:** The readable name of the person writing the article.

**Twitter_Handle:** Your nickname on [Twitter](http://twitter.com/).

**Publication_date:** Date in YYYY-MM-DD format with the current date.

**Excerpt:** Short summary displayed in the blog listing.

**Body:** Main content of the article.

>> _The original article had these instructions, now (2024) it is handled differently_ see [Images](#images)
>
> ### Annexes
>
> To upload images, press the **Add Attachment** button located in the sidebar.
>
> ![Upload attachments](/img/posts/2017/contribuir-pybaq/cargar_adjuntos.png)
>
> As a final step, if you upload multiple images, to only show one of the images uploaded as attachments, select the image and mark it as hidden by selecting the option *Should this page be hidden?* and disabling *If this is enabled, the page can be detected; otherwise, the URL must be known.*
> ![Hide images](/img/posts/2017/contribuir-pybaq/ocultas.png)
>
> Once the writing is finished, you can preview the article in the admin panel.
>
> ![Preview](/img/posts/2017/contribuir-pybaq/contribuir_django_quilla_web.png)
>
> You can also see it finalized in the blog.
>
> ![Final result](/img/posts/2017/contribuir-pybaq/resultado_final.png)
>

### Images
To add the main image of the article, simply attach it using the **Add Attachment** button. The program will show the image in that directory as the main image of the article.

All other images should be included in the following folder:
```
/assets/img/posts/[year]/[article-slug]/
```
You should add them as links to the img folder directly. Below is an example from this same page:
```markdown
![Clone repository console](/img/posts/2017/contribuir-blog-python-barranquilla/ejecutar.png)
```

## How to make a Pull Request to the PyBAQ repository

### Pull request

![Create Branch](/img/posts/2017/contribuir-pybaq/crear_branch.png)

To accept changes made by community members, a control of the different commits is carried out. To be able to make a commit, the person must be familiar with various Git operations such as add and commit ([see Annex 2](#annex-2-contribution-workflow-on-github)).

![Commit](/img/posts/2017/contribuir-pybaq/commit.png)

As the final step in the terminal, we push the elements to be uploaded, verifying the branch Git is currently on, as well as confirming the remote branch to which it will be uploaded.

![Push](/img/posts/2017/contribuir-pybaq/push.png)

And in the Git interface, proceed to make the final Pull Request to submit the changes for approval.

![Pull Request](/img/posts/2017/contribuir-pybaq/pull_request.png)

I hope my article was helpful. If you see that there are sections of this entry that can be improved, please leave me a comment or an [issue on Github tagging my user @Scot3004](https://github.com/PyBAQ/django-quilla-web/issues).

#### _Editor's Note:_
_For those who are just starting, we've included links to the tools you need to learn to make your contributions. Teaching and explaining to others is a great way to learn even more. Keep going!_

_Best regards, Javier_

---------------------------

## _Annex 1: How to install Lektor_
How to install it and some context.

### _What is Lektor?_
A powerful and flexible static content management system for creating complex and attractive websites from flat files—for people who don't want to compromise between a CMS and a static page generator.

### _How to install it?_
On the [Lektor website](https://www.getlektor.com/downloads/), it explains how to install it. If you have any issues, access the [community discord](https://discord.gg/46N5dPm9Zk) and ask for help.

### _How to use it?_
To understand a bit about how to use Lektor, we recommend creating your own project following the [Lektor quickstart guide](https://www.getlektor.com/docs/quickstart/). We would like to provide more help, but in this case, the documentation is already written. If English is not your thing, you can translate the page with Google.

---------------------------------

## _Annex 2: Contribution Workflow on Github_
To contribute to code projects (open or closed), we must understand the basics of Git, Github, and the importance of version control in code projects. Contributing to our blog is a way to gain that experience.

### _Understanding the workflow_
The workflow to contribute to PyBAQ is the same as almost all software projects: [pull request](https://docs.github.com/en/get-started/quickstart/github-flow). In the list below, you'll see illustrations on how to work with Github (the web platform). This interaction is usually done with Git (the tool that handles version control). Freecodecamp has a [good beginner's guide](https://www.freecodecamp.org/espanol/news/guia-para-principiantes-de-git-y-github/).

1. Pull/Fork: [Create a copy](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) of the repository in your GitHub account.
2. Branch: Create a branch with a name related to the contribution you will make.
![Branch](/img/posts/2023/contribuir-modo-facil/flow-branch.png)
3. Commit: Make changes to the code. For example: write a new article. Save the changes in that branch (branch) and commit them.
4. Push: Send the changes you have linked to the branch to your repository.
![Commit & Push](/img/posts/2023/contribuir-modo-facil/flow-commits.png)
5. Pull Request: Submit a request to include your code on the page.
![Pull Request](/img/posts/2023/contribuir-modo-facil/flow-pullreq.png)
6. Discuss: Discuss the changes you have introduced with the owners of the original repository. If there are changes, just repeat steps 3 and 4; the pull request will cover the commits you make to that branch until it is accepted.
![Discuss](/img/posts/2023/contribuir-modo-facil/flow-discuss.png)
7. Rebase + Merge: See in [original article](https://docs.github.com/en/get-started/quick

start/github-flow).
![Rebase & Merge](/img/posts/2023/contribuir-modo-facil/flow-merge.png)

If you have a basic understanding of Git but don't like the command line or don't feel comfortable with it yet, there is also [Github Desktop](https://github.com/apps/desktop).
---
title:

How to contribute to the Python Barranquilla Blog
118 changes: 86 additions & 32 deletions content/blog/contribuir-blog-python-barranquilla/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ pub_date: 2017-11-06
---
body:

En el siguiente artículo hablaré sobre como contribuir en el blog de Python Barranquilla. Para colaborar en el blog de la comunidad es necesario que tengas conocimientos previos en [Git](https://www.codeschool.com/courses/try-git), GitHub, [Markdown](https://guides.github.com/features/mastering-markdown/) y virtualenvs( esto ya es opcional).
En el siguiente artículo hablaré sobre como contribuir en el blog de Python Barranquilla. Para colaborar en el blog de la comunidad es necesario que tengas conocimientos previos en:
- [Lektor](#anexo-1-como-instalar-lektor)
- [Git y Github](#anexo-2-ciclo-de-trabajo-de-contribucion-en-github)
- [Markdown](https://guides.github.com/features/mastering-markdown/)
- virtualenvs (esto es opcional).

El contenido de este artículo se encuentra dividido en 2 secciones importantes:

Expand All @@ -34,33 +38,34 @@ git clone https://github.com/PyBAQ/django-quilla-web.git

Una vez hayas clonado el repositorio e [instalado lektor en tu computador](https://www.getlektor.com/docs/installation/), debes correr el servidor local usando `lektor server -f webpack`.

![Clonar repositorio consola](/img/contribuir-pybaq/ejecutar.png)
![Clonar repositorio consola](/img/posts/2017/contribuir-pybaq/ejecutar.png)

### Creación de entrada en lektor

### Creación de una entrada en lektor

Ahora, ingresamos a la URL [http://localhost:5000](http://localhost:5000) y verás el sitio web en tu navegador.

![Página de inicio](/img/contribuir-pybaq/home.png)
![Página de inicio](/img/posts/2017/contribuir-pybaq/home.png)

Se navega hacia la página que se quiere editar, para nuestro caso se navega hacia blog y se presiona el botón editar.

![Página del blog](/img/contribuir-pybaq/pagina_blog.png)
![Página del blog](/img/posts/2017/contribuir-pybaq/pagina_blog.png)

Luego nos dirigimos hacia la parte superior derecha y presionamos un botón con forma de lápiz.

![Botón editar](/img/contribuir-pybaq/boton_editar.png)
![Botón editar](/img/posts/2017/contribuir-pybaq/boton_editar.png)

Al presionar el botón, se cargara el panel administrativo para editar la página del blog.

![Editar blog](/img/contribuir-pybaq/editar_blog.png)
![Editar blog](/img/posts/2017/contribuir-pybaq/editar_blog.png)

Para proceder con la creación de la entrada se ingresa el título y el [slug](https://yoast.com/slug/)

![Crear entrada](/img/contribuir-pybaq/crear_entrada.png)
![Crear entrada](/img/posts/2017/contribuir-pybaq/crear_entrada.png)

Luego se completa el resto de la información

![Editar entrada](/img/contribuir-pybaq/editar_entrada.png)
![Editar entrada](/img/posts/2017/contribuir-pybaq/editar_entrada.png)

**Title:** Se refiere al título de la entrada.

Expand All @@ -74,42 +79,55 @@ Luego se completa el resto de la información

**Body:** Contenido central del artículo.

### Anexos

Para Cargar los anexos(imágenes) se presiona el botón **Añadir Adjunto** Ubicado en la barra lateral.

![Cargar adjuntos](/img/contribuir-pybaq/cargar_adjuntos.png)

Como paso final si se suben multiples imágenes, para que solo muestre una de las imágenes cargadas como anexos, se debe seleccionar la imagen y marcarla como oculta seleccionando la opción *¿Debería estar oculta esta página?* y desactivar *Si esto está habilitado la página puede ser detectada, en caso contrario la URL ha de ser conocida.*
![Ocultar imagenes](/img/contribuir-pybaq/ocultas.png)

Una vez terminada la redacción se puede visualizar el artículo en el administrador.

![Previsualizar](/img/contribuir-pybaq/contribuir_django_quilla_web.png)

También podrás verlo finalizado en el blog.

![Resultado final](/img/contribuir-pybaq/resultado_final.png)

>>_El articulo original tenía estas isntrucciones, ahora (2024) se maneja de manera diferente _ vea [Imágenes](#imagenes)
>
>### Anexos
>
>Para Cargar las imágenes se presiona el botón **Añadir Adjunto** Ubicado en la barra lateral.
>
>![Cargar adjuntos](/img/posts/2017/contribuir-pybaq/cargar_adjuntos.png)
>
>Como paso final si se suben multiples imágenes, para que solo muestre una de las imágenes cargadas como anexos, se debe seleccionar la imagen y marcarla como oculta seleccionando la opción *¿Debería estar oculta esta página?* y desactivar *Si esto está habilitado la página puede ser detectada, en caso contrario la URL ha de ser conocida.*
>![Ocultar imagenes](/img/posts/2017/contribuir-pybaq/ocultas.png)
>
>Una vez terminada la redacción se puede visualizar el artículo en el administrador.
>
>![Previsualizar](/img/posts/2017/contribuir-pybaq/contribuir_django_quilla_web.png)
>
>También podrás verlo finalizado en el blog.
>
>![Resultado final](/img/posts/2017/contribuir-pybaq/resultado_final.png)
>
### Imágenes
Para añadir la imagen principal del artículo, simplemente adjuntala usando el boton **Add Attachment** o **Añadir Adjunto**. El programa mostrará la imagen en ese directorio como imagen principal del articulo.

Todas las demás imagenes las deberas incluir en la siguiente carpeta:
```
/assets/img/posts/[año]/[slug-del-articulo]/
```
las deberás agregar como links a la carpeta img directamente, abajo un ejemplo de esta misma página:
```markdown
![Clonar repositorio consola](/img/posts/2017/contribuir-blog-python-barranquilla/ejecutar.png)
```

## Como hacer el Pull Request al repositorio de PyBAQ.

### Pull request

![Crear Branch](/img/contribuir-pybaq/crear_branch.png)
![Crear Branch](/img/posts/2017/contribuir-pybaq/crear_branch.png)

Para aceptar los cambios que los miembros de la comunidad realizan, se efectuá un control de los diferentes commits.
Para poder realizar un commit es necesario que la persona este acostumbrada a las diferentes operaciones de git como lo son add y commit.
Para aceptar los cambios que los miembros de la comunidad realizan, se efectuá un control de los diferentes commits. Para poder realizar un commit es necesario que la persona este acostumbrada a las diferentes operaciones de git como lo son add y commit ([ver Anexo 2](#anexo-2-ciclo-de-trabajo-de-contribucion-en-github)).

![Commit](/img/contribuir-pybaq/commit.png)
![Commit](/img/posts/2017/contribuir-pybaq/commit.png)

Como ultimo paso en el terminal, hacemos un envió de los elementos a subir, verificando la rama en la que se encuentra git en el momento, ademas de corroborar la rama remota en la que se subirá

![Push](/img/contribuir-pybaq/push.png)
![Push](/img/posts/2017/contribuir-pybaq/push.png)

Y en la interfaz de git se procede a hacer el Pull Request final, para pasar los cambios a aprobación

![Pull Request](/img/contribuir-pybaq/pull_request.png)
![Pull Request](/img/posts/2017/contribuir-pybaq/pull_request.png)

Espero que haya sido de ayuda mi artículo. Si ven que hay secciones de esta entrada que se pueden mejorar, por favor escríbanme un comentario o un [issue en Github etiquetando mi usuario @Scot3004](https://github.com/PyBAQ/django-quilla-web/issues).

Expand All @@ -118,3 +136,39 @@ _Para las personas que está empezando, les dejamos en el artículo enlaces haci

_Atte, Javier_

---------------------------

## _Anexo 1: Como instalar Lektor_
Como instalarlo y algo de contexto.

### _¿Qué es Lektor?_
Un sistema de gestión de contenido estático potente y flexible para crear sitios web complejos y atractivos a partir de archivos planos – para personas que no desean hacer concesiones entre un CMS y un motor de páginas estáticas.

### _¿Como instalarlo?_
En la [página web de Lektor](https://www.getlektor.com/downloads/) se explica como instalarlo. Si tiene algún problema acceda al [discord de la comunidad](https://discord.gg/46N5dPm9Zk) y pida ayuda.

### _¿Como se usa?_
Para entender un poco como se usa Lektor, le recomendamos crear su propio proyecto siguiendo la [guia de inicio rapido de Lektor](https://www.getlektor.com/docs/quickstart/). Nos gustaría brindar mas ayuda, pero en este caso la documentación ya está escrita. Si el inglés no es lo suyo, puede traducir la página con google.

---------------------------------

## _Anexo 2: Ciclo de trabajo de Contribución en Github_
Para poder contribuir a proyectos de código (abierto o cerrado) debemos entender lo básico de Git, Github y la importancia del control de versionamiento en proyectos de codigo. Contribuir a nuestro blog es una manera de ganar esa experiencia.

### _Entendiendo el flujo de trabajo_
El flujo de trabajo para contribuir a PyBAQ es el mismo de casi todos los proyectos de software: [pull request](https://docs.github.com/en/get-started/quickstart/github-flow). En la lista abajo verá con ilustraciones como trabajar con Github (la plataforma web). Esa interacción se hace usualmente con Git (la herramienta que hace el control de version). Freecodecamp tiene una [buena guia para principiantes](https://www.freecodecamp.org/espanol/news/guia-para-principiantes-de-git-y-github/)

1. Pull/Fork: [Crea una copia](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) del repositorio en tu cuenta de GitHub.
2. Branch: Crea una rama con un nombre relacionado a la contribución que harás.
![Branch](/img/posts/2023/contribuir-modo-facil/flow-branch.png)
3. Commit: Realiza los cambios en el código. Por ejemplo: redacta un nuevo articulo. Guarda los cambios en esa rama (branch) y guardalos haciendo un commit.
4. Push: Envía los cambios que has vinculado a la rama a tu repositorio.
![Commit & Push](/img/posts/2023/contribuir-modo-facil/flow-commits.png)
5. Pull Request: Has una solicitud de inclusión de tu código en la pagina.
![Pull Request](/img/posts/2023/contribuir-modo-facil/flow-pullreq.png)
6. Discuss: Discute los cambios que has introducido con los dueños del repositorio original. Si hay cambios solo debes realizarlos repitiendo los pasos 3 y 4; el pull request abarcará los commits que hagas a esa rama hasta que sea aceptado.
![Discuss](/img/posts/2023/contribuir-modo-facil/flow-discuss.png)
7. Rebase + Merge: Ver en [articulo original](https://docs.github.com/en/get-started/quickstart/github-flow).
![Rebase & Merge](/img/posts/2023/contribuir-modo-facil/flow-merge.png)

Si tienes bases de Git, pero no te gusta mucho la linea de comandos o no te sientes cómodo(a) aún, existe también [Github Desktop](https://github.com/apps/desktop).
Loading

0 comments on commit b2eda71

Please sign in to comment.