Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vic Shóstak committed Jan 6, 2024
1 parent 2292671 commit e9f329d
Show file tree
Hide file tree
Showing 40 changed files with 782 additions and 903 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Vic Shóstak
Copyright 2024 Vic Shóstak

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Your PRs are welcome! Thank you 😘

## ⚠️ License

[`The Gowebly Docs`][repo_url] is free and open-source software licensed under the [Apache 2.0 License][repo_license_url], created and supported by [Vic Shóstak][author_url] and the [True Web Artisans][true_web_artisans_url] team with 🩵 for people and robots. Official logo distributed under the [Creative Commons License][repo_cc_license_url] (CC BY-SA 4.0 International).
[`The Gowebly Docs`][repo_url] is free and open-source software licensed under the [Apache 2.0 License][repo_license_url], created and supported by [Vic Shóstak][author_url] with 🩵 for people and robots. Official logo distributed under the [Creative Commons License][repo_cc_license_url] (CC BY-SA 4.0 International).

<!-- Repository links -->

Expand All @@ -32,7 +32,6 @@ Your PRs are welcome! Thank you 😘
<!-- Author links -->

[author_url]: https://github.com/koddr
[true_web_artisans_url]: https://github.com/truewebartisans

<!-- README links -->

Expand Down
6 changes: 3 additions & 3 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const userConfig: UserConfig = {
collapsed: false,
items: [
{ text: 'Установка', link: '/ru/complete-user-guide/installation' },
{ text: 'Info about your system', link: '/ru/complete-user-guide/info-about-system' },
{ text: 'Информация о вашей системе', link: '/ru/complete-user-guide/info-about-system' },
{ text: 'Создание нового проекта', link: '/ru/complete-user-guide/create-new-project' },
{ text: 'Запуск проекта', link: '/ru/complete-user-guide/run-your-project' },
]
Expand Down Expand Up @@ -132,7 +132,7 @@ const userConfig: UserConfig = {
collapsed: false,
items: [
{ text: '安装', link: '/zh_HK/complete-user-guide/installation' },
{ text: 'Info about your system', link: '/zh_HK/complete-user-guide/info-about-system' },
{ text: '系统信息', link: '/zh_HK/complete-user-guide/info-about-system' },
{ text: '创建新项目', link: '/zh_HK/complete-user-guide/create-new-project' },
{ text: '运行项目', link: '/zh_HK/complete-user-guide/run-your-project' },
]
Expand Down Expand Up @@ -194,7 +194,7 @@ const userConfig: UserConfig = {
collapsed: false,
items: [
{ text: 'Instalación', link: '/es/complete-user-guide/installation' },
{ text: 'Info about your system', link: '/es/complete-user-guide/info-about-system' },
{ text: 'Información sobre su sistema', link: '/es/complete-user-guide/info-about-system' },
{ text: 'Crear un nuevo proyecto', link: '/es/complete-user-guide/create-new-project' },
{ text: 'Ejecute su proyecto', link: '/es/complete-user-guide/run-your-project' },
]
Expand Down
160 changes: 72 additions & 88 deletions docs/es/complete-user-guide/create-new-project.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Crear un nuevo proyecto
# Create a new project

Para iniciar un nuevo proyecto, ejecute el comando `create`:
To start a new project, execute the `create` command:

::: code-group
```bash [CLI]
Expand All @@ -10,137 +10,121 @@ gowebly create
```bash [Go]
go run github.com/gowebly/gowebly@latest create
```

```bash [Docker]
docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} gowebly/gowebly:latest create
```
:::

<img width="100%" alt="gowebly create" src="https://raw.githubusercontent.com/gowebly/.github/main/images/gowebly_create.gif"/>

## ¿Qué hace el CLI por ti?
And result will be:

Cada vez que ejecutas el comando `create` para un proyecto, el CLI de **Gowebly** realiza lo siguiente en segundo plano:

| Paso | Descripción | ¿Es asíncrono? |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------- | :------------: |
| **1** | **El CLI valida la configuración y la aplica al proyecto actual** | No |
| **2** | **El CLI genera la estructura de tu proyecto (carpetas y archivos)** | No |
| **3** | **El CLI prepara la parte backend de tu proyecto** | |
| 3.1 | El CLI genera los archivos de utilidad necesarios (`go.mod`, archivos de backend, y más) ||
| 3.2 | Si `template_engine` está configurado como `templ`, el CLI instala [Templ][backend_ah_templ_url] en tu sistema y ejecuta `templ generate` ||
| 3.3 | El CLI ejecuta `go mod tidy` ||
| **4** | **El CLI prepara la parte frontend de tu proyecto** | |
| 4.1 | El CLI genera el archivo `styles.css` con estilos mínimos para el framework CSS elegido ||
| 4.2 | El CLI genera los archivos de utilidad necesarios (`package.json`, configuración para el framework CSS elegido, y más) ||
| 4.3 | El CLI ejecuta los scripts `install` y `build:dev` del archivo `package.json` con el entorno de ejecución de JavaScript elegido por primera vez ||
| **5** | **El CLI descarga las versiones minimizadas de htmx e hyperscript desde el confiable [unpkg.com][other_unpkg_url] CDN** ||

::: tip Pasos asíncronos
La CLI de **Gowebly** ejecuta todos los bloques con pasos asíncronos en **goroutines** individuales. Por lo tanto, la creación de un nuevo proyecto es varias veces más rápido que si se inicia cada paso uno tras otro.
:::

## Diagrama

Para visualizar el flujo de trabajo de **Gowebly** CLI, consulte el diagrama:

```mermaid
stateDiagram-v2
Validation: Validación de la configuración
Structure: Generar la estructura del proyecto
Backend: Preparar la parte backend
Frontend: Preparar la parte frontal
Downloading: Descarga de guiones
Goroutines: Goroutines individuales
direction LR
[*] --> Validation
Validation --> Structure
Structure --> Goroutines
state Goroutines {
direction LR
Backend
Frontend
Downloading
}
Goroutines --> [*]
```

## Estructura del proyecto después de crearlo
<img width="100%" alt="gowebly create" src="https://raw.githubusercontent.com/gowebly/.github/main/images/gowebly_create.gif"/>

Normalmente, tras ejecutar el comando `create`, un proyecto creado contiene los siguientes archivos y carpetas:
Typically, the created project contains the following files and folders:

::: code-group
```bash{21,22} [Sin motores de plantillas]
```bash{18,19} [Using html/template]
.
├── assets
│ └── styles.css
│ ├── scripts.js
│ └── styles.scss
├── static
│ ├── favicons
│ │ ├── apple-touch-icon.png
│ │ ├── favicon.ico
│ │ ├── favicon.png
│ │ ├── favicon.svg
│ │ ├── manifest-desktop-screenshot.jpeg
│ │ ├── manifest-mobile-screenshot.jpeg
│ │ └── manifest-touch-icon.svg
│ ├── images
│ │ └── logo.svg
│ ├── htmx.min.js
│ ├── hyperscript.min.js
│ ├── styles.css
│ │ └── gowebly.svg
│ ├── apple-touch-icon.png
│ ├── favicon.ico
│ ├── favicon.png
│ ├── favicon.svg
│ ├── manifest-desktop-screenshot.jpeg
│ ├── manifest-mobile-screenshot.jpeg
│ ├── manifest-touch-icon.svg
│ └── manifest.json
├── templates
│ ├── pages
│ │ └── index.html
│ └── main.html
├── .air.toml
├── .dockerignore
├── .gitignore
├── .prettierignore
├── docker-compose.yml
├── Dockerfile
├── go.mod
├── go.sum
├── handlers.go
├── main.go
├── package.json
├── package-lock.json
├── prettier.config.js
└── server.go
```

```bash{22,24} [Utilizar Templ]
```bash{19,21} [Using Templ]
.
├── assets
│ └── styles.css
│ ├── scripts.js
│ └── styles.scss
├── static
│ ├── favicons
│ │ ├── apple-touch-icon.png
│ │ ├── favicon.ico
│ │ ├── favicon.png
│ │ ├── favicon.svg
│ │ ├── manifest-desktop-screenshot.jpeg
│ │ ├── manifest-mobile-screenshot.jpeg
│ │ └── manifest-touch-icon.svg
│ ├── images
│ │ └── logo.svg
│ ├── htmx.min.js
│ ├── hyperscript.min.js
│ ├── styles.css
│ │ └── gowebly.svg
│ ├── apple-touch-icon.png
│ ├── favicon.ico
│ ├── favicon.png
│ ├── favicon.svg
│ ├── manifest-desktop-screenshot.jpeg
│ ├── manifest-mobile-screenshot.jpeg
│ ├── manifest-touch-icon.svg
│ └── manifest.json
├── templates
│ ├── pages
│ │ ├── index_templ.go
│ │ └── index.templ
│ ├── main_templ.go
│ └── main.templ
├── .air.toml
├── .dockerignore
├── .gitignore
├── .prettierignore
├── docker-compose.yml
├── Dockerfile
├── go.mod
├── go.sum
├── handlers.go
├── main.go
├── package.json
├── package-lock.json
├── prettier.config.js
└── server.go
```
:::

::: danger Archivos autogenerates por Templ
Por favor, **no** edite los archivos `*_templ.go` Go en la carpeta `./templates` de su proyecto. Son autogenerates por la CLI de **Templ** a partir de las plantillas `*.templ`.
::: danger Auto-generated files by Templ
Please do **not** edit `*_templ.go` Go files in the `./templates` folder of your project! They're auto-generated by the **Templ** CLI from `*.templ` templates.
:::

## What CLI does for you?

Every time you execute the `create` command for a project, the **Gowebly** CLI does the following under the hood:

| Step | Description |
| :---: | ---------------------------------------------------------------------------------------------------------------- |
| **1** | **The structure of your project** |
| | CLI creates the project folders and all needed miscellaneous files |
| **2** | **The backend part of your project** |
| | CLI generates the backend files (`go.mod`, chosen Go framework files, and so on) |
| | CLI runs `go mod tidy` and `go fmt` for the first time |
| **3** | **The frontend part of your project** |
| | CLI generates the `scripts.js` file with importing the chosen reactivity library |
| | CLI generates the `styles.scss` file with minimal styles for the chosen CSS framework |
| | CLI generates the needed utility files (`package.json`, config for the chosen CSS framework, and so on) |
| | CLI runs `install` and `build` scripts from the `package.json` file with the chosen frontend runtime environment |

To visualize the workflow, please refer to the diagram:

```mermaid
stateDiagram-v2
Structure: Generate project structure
Backend: Prepare backend part
Frontend: Prepare frontend part
direction LR
[*] --> Structure
Structure --> Backend
Backend --> Frontend
Frontend --> [*]
```

<!--@include: ../../parts/links.md -->
2 changes: 1 addition & 1 deletion docs/es/complete-user-guide/info-about-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ And result will be:
✱ For more information go to the official docs: https://gowebly.org
```

<!--@include: ../parts/links.md -->
<!--@include: ../../parts/links.md -->
32 changes: 10 additions & 22 deletions docs/es/complete-user-guide/installation.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,37 @@
# Instalación
# Installation

Los conceptos básicos para la instalación de **Gowebly** CLI en su sistema están cubiertos en esta sección.
The basics for installing the **Gowebly** CLI on your system are covered in this section.

## Go

[Descarga][go_download_url] e instala **Go**. Se requiere la versión `1.21` (o superior).
[Download][go_download_url] and install **Go**. Version `1.21` (or higher) is required.

A continuación, utilice el comando [`go install`][go_install_url]:
Then, use the [`go install`][go_install_url] command:

``` bash
go install github.com/gowebly/gowebly@latest
```

## Docker

Siéntete libre de usar **Gowebly** CLI desde nuestra [imagen Docker oficial][docker_gowebly_image_url] y ejecutarlo en el contenedor:

``` bash
docker pull gowebly/gowebly:latest
```

::: danger Limitaciones de la imagen Docker
Esta imagen Docker funciona **solo** en los sistemas GNU/Linux (`amd64` o `arm64`, incluido WSL).
:::

## Homebrew

GNU / Linux y Apple macOS usuarios disponibles manera de instalar **Gowebly** CLI a través de [Homebrew][other_brew_url].
GNU/Linux and Apple macOS users available way to install **Gowebly** CLI via [Homebrew][other_brew_url].

Toque una nueva fórmula:
Tap a new formula:

``` bash
brew tap gowebly/tap
```

Instalar:
Install:

``` bash
brew install gowebly/tap/gowebly
```

## Modo manual
## Manual mode

Descargue archivos `exe` ya preparados para Windows, `deb` (para Debian, Ubuntu), `rpm` (para CentOS, Fedora), `apk` (para Alpine), o paquetes Arch Linux desde la página [Releases][repo_releases_url].
Download ready-made `exe` files for Windows, `deb` (for Debian, Ubuntu), `rpm` (for CentOS, Fedora), `apk` (for Alpine), or Arch Linux packages from the [Releases][repo_releases_url] page.

Instalado como lo harías normalmente.
Install it like you normally would.

<!--@include: ../../parts/links.md-->
Loading

0 comments on commit e9f329d

Please sign in to comment.