Archivo Trans¶
Git Workflow¶
Estructura de los directorios¶
Para referencia:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | . #--> Tu directorio local donde clonaste el repo. └── www #--> Repository root ├── docroot #--> Drupal root │ ├── composer.json │ ├── composer.lock │ ├── composer.lock.bak │ ├── config │ ├── drush │ ├── index.html │ ├── LICENSE │ ├── load.environment.php │ ├── phpunit.xml.dist │ ├── README.md │ ├── RoboFile.php │ ├── scripts │ └── web #--> Drupal *site* root. Aquí está instalado Drupal, y es el dir público que sirve el webserver. └── README.md |
- Drupal site root (
web). Para entender dónde están las cosas en Drupal. - Drupal Custom Theme (
archivo_trans). Este es el theme que estamos usando para el Archivo. Aquí está el sass/css, js, node modules, etc… - Drupal Custom Theme Templates. Para ver los Twig templates que general el markup HTML.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | └── web
├── autoload.php
├── index.php
├── modules
│ └── custom #--> Los Custom Modules están aquí.
├── profiles
├── robots.txt
├── sites
│ ├── default
│ ├── development.services.yml
│ ├── example.settings.local.php
│ └── example.sites.php
├── themes
│ └── custom #--> Los Custom Themes están aquí.
├── update.php
└── web.config
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | . └── archivo_trans #--> Este es nuestro custom theme ├── archivo_trans.breakpoints.yml ├── archivo_trans.info.yml ├── archivo_trans.libraries.yml #--> Este archivo yaml define nuestras "librerías". Qué css/js se incluye etc... ├── archivo_trans.theme #--> Aquí algunas preprocess functions para nuestro theme. ├── config.rb ├── css #--> Probablemente podríamos limpiar un poco esto. Lo conservo como referencia por si quisiéramos armar mejor la librería. │ ├── animate.css │ ├── app.css │ ├── app.css.map │ ├── archivo.css #--> El archivo con el custom css para nuestro theme. **Este es el archivo que vos me mandás**. │ ├── chosen.custom.css │ ├── ckeditor.css │ ├── foundation.css │ ├── foundation.min.css │ ├── overlay.css │ ├── print.css │ ├── slick.css │ ├── style.css │ ├── swipebox.css │ └── vendor │ ├── bootstrap.min.css #--> El archivo con el css de Bootstrap. │ └── jquery.fancybox.min.css ├── favicon.ico ├── fonts ├── g4315.png ├── gulpfile.js ├── icon.pnj ├── images ├── js │ ├── archivo_trans.js #--> Archivo con custom js específico para nuestro theme. │ ├── foundation.js │ ├── main.js │ └── vendor │ ├── a79093e0dd.js │ ├── bootstrap.min.js #--> El archivo de js de Bootstrap. │ ├── jquery.fancybox.min.js │ └── popper.min.js ├── logo2.png ├── logo.png ├── logo.svg ├── node_modules ├── package.json ├── package-lock.json ├── README.md ├── screenshot.png ├── scss ├── src ├── styleguide.md └── templates |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | archivo_trans
└── templates
├── block
│ ├── block--amt.html.twig
│ ├── block.html.twig
│ ├── block--ibermemoria.html.twig
│ ├── block--mecenazgo.html.twig
│ ├── block--system-branding-block.html.twig
│ └── block--system-menu-block.html.twig
├── content
│ ├── page-title.html.twig
│ ├── taxonomy-term--fondos.html.twig
│ └── taxonomy-term.html.twig
├── content-edit
│ └── image-widget.html.twig
├── field #--> En un Mundo ideal, el markup especial *tan* específico (o sea, por campo) debería evitarse.
│ ├── field--block-content--field-link.html.twig
│ ├── field--body.html.twig
│ ├── field--daterange.html.twig
│ ├── field--entity-reference.html.twig
│ ├── field--field-detalles.html.twig
│ ├── field--field-fondo.html.twig
│ ├── field--field-highlights.html.twig
│ ├── field--field-media-image--fancy.html.twig
│ ├── field--field-thumb.html.twig
│ ├── field.html.twig
│ ├── field--media--image.html.twig
│ ├── field--name.html.twig
│ └── fieldset.html.twig
├── group
│ └── group-content.html.twig
├── layout
│ ├── html.html.twig
│ ├── page--front.html.twig
│ ├── page.html.twig
│ ├── page--node.html.twig
│ ├── page--user.html.twig
│ ├── region--footer.html.twig
│ └── region.html.twig
├── media
│ ├── media.html.twig
│ └── media--image--reference-table.html.twig
├── navigation
│ ├── links.html.twig
│ ├── menu.html.twig
│ └── menu-local-tasks.html.twig
├── node
│ ├── node--eventos.html.twig
│ ├── node.html.twig
│ ├── node--node_via_group_content.html.twig
│ ├── node--persona--teaser.html.twig
│ └── node--unidad-documental--teaser.html.twig
├── paragraph
│ ├── paragraph--accordion-tabs.html.twig
│ ├── paragraph--accordion-tabs-item.html.twig
│ ├── paragraph--banner.html.twig
│ ├── paragraph--banner-item.html.twig
│ ├── paragraph--content.html.twig
│ ├── paragraph--grid.html.twig
│ ├── paragraph.html.twig
│ ├── paragraph--image-grid.html.twig
│ ├── paragraph--image.html.twig
│ ├── paragraph--image-slideshow.html.twig
│ ├── paragraph--image-slideshow-item.html.twig
│ ├── paragraph--list-of-links.html.twig
│ └── paragraph--wysiwyg-columns.html.twig
└── view
├── views-view--catalogo--block.html.twig
├── views-view-fields--carousel.html.twig
├── views-view-fields--catalogo.html.twig
├── views-view-fields--ud-search.html.twig
├── views-view-field--ud-search.html.twig
├── views-view.html.twig
├── views-view--taxonomy-term--page-2.html.twig
├── views-view--ud-search--block.html.twig
├── views-view-unformatted--carousel.html.twig
└── views-view-unformatted--taxonomy-term--page-2.html.twig
|
Commiting code¶
Overview¶
Estamos usando la rama master como base, así que creamos los PR contra esa rama.
NOTA: Para poder pushear al repo tenés que estar agregada como miembro. Si no tenés acceso escribime (Mariana) o a Jere.
-
Hacés tus cambios en los estilos y/o twig templates.
-
Si además de código estás cambiando configuración (cambios en la DB de Drupal), acordate de exportar y agregar esos cambios.
1 | lando drush cex |
And remember to add config dir yml’s files to your commit.
1 | git add config/sync |
- Add files + create new branch + commit + push
Siempre siempre pulleá la master branch por si hubo cambios!!
1 2 3 4 5 | git pull origin master git add path/to/changed/files git checkout -b feature/AMT-123 git commit -m 'Mis cambios maravillosos en tal cosa' git push origin feature/AMT-123 |
Un ejemplo sería:
1 2 3 4 5 | git pull origin master git add web/themes/custom/archivo_trans/css/archivo.css git checkout -b feat/home_tweaks git commit -m 'Arreglando estilos del slider del home para mobile' git push origin feat/home_tweaks |
-
Crear un pull request para la rama que acabás de pushear
-
Agregar al menos una persona como reviewer
-
Avisale a esa persona que chequeé sus mails

Branch Naming convention¶
The idea is to use feat and fix as keywords, so:
| Change Type | Branch Name example |
|---|---|
| New work | feat/AMT-123 |
| Fix | fix/AMT-123 |
Important NOTE: Branch names must be short. Verify they do not exceed 25 chars.
Process¶
Cuando tu PR sea revisado y mergeado, se va a deployar automáticamente al servidor. O sea: todo lo que se mergea en master termina en el servidor!
Cuando eso suceda vas a poder ver tus cambios en https://archivotrans.com.ar/