├── .devcontainer.json
├── .editorconfig
├── .github
└── workflows
│ └── deploy-website.yaml
├── .gitignore
├── .prettierignore
├── .prettierrc
├── Dockerfile
├── LICENSE
├── README.md
├── assets
├── code-sample.md
├── showcase-items.json
└── vala-hero-next.svg
├── config.toml
├── content
├── _index.cs.md
├── _index.fr.md
├── _index.md
├── _index.pt_BR.md
├── _index.ru.md
├── _index.zh_CN.md
├── about
│ ├── index.cs.md
│ ├── index.fr.md
│ ├── index.md
│ ├── index.pt_BR.md
│ ├── index.ru.md
│ └── index.zh_CN.md
├── blog
│ ├── _index.md
│ ├── c-off-ramp.md
│ ├── planet-gnome.md
│ ├── vala-0-56.md
│ └── valabot.md
└── vala-hero.png
├── docker-compose.yml
├── docs
├── 1-overview.md
├── 2-structure.md
├── 3-pages.md
├── 4-styling.md
├── 5-potential-issues.md
└── CONTRIBUTING.md
├── sass
└── css
│ ├── _base.scss
│ ├── _reset.scss
│ ├── _typography.scss
│ ├── blog-post.scss
│ ├── blog.scss
│ ├── components
│ ├── _cta.scss
│ ├── _feature.scss
│ ├── _footer.scss
│ ├── _global.scss
│ ├── _header-nav.scss
│ ├── _post-preview.scss
│ └── _showcase.scss
│ ├── global.scss
│ ├── index.scss
│ └── utils
│ ├── _container.scss
│ └── _index.scss
├── static
├── CNAME
├── android-icon-144x144.png
├── android-icon-192x192.png
├── android-icon-36x36.png
├── android-icon-48x48.png
├── android-icon-72x72.png
├── android-icon-96x96.png
├── apple-icon-114x114.png
├── apple-icon-120x120.png
├── apple-icon-144x144.png
├── apple-icon-152x152.png
├── apple-icon-180x180.png
├── apple-icon-57x57.png
├── apple-icon-60x60.png
├── apple-icon-72x72.png
├── apple-icon-76x76.png
├── apple-icon-precomposed.png
├── apple-icon.png
├── browserconfig.xml
├── css
│ ├── syntax-theme-dark.css
│ └── syntax-theme-light.css
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon-96x96.png
├── favicon.ico
├── fonts
│ ├── Inter-Black.woff
│ ├── Inter-Black.woff2
│ ├── Inter-Bold.woff
│ ├── Inter-Bold.woff2
│ ├── Inter-ExtraBold.woff
│ ├── Inter-ExtraBold.woff2
│ ├── Inter-ExtraLight.woff
│ ├── Inter-ExtraLight.woff2
│ ├── Inter-Light.woff
│ ├── Inter-Light.woff2
│ ├── Inter-Medium.woff
│ ├── Inter-Medium.woff2
│ ├── Inter-Regular.woff
│ ├── Inter-Regular.woff2
│ ├── Inter-SemiBold.woff
│ ├── Inter-SemiBold.woff2
│ ├── Inter-Thin.woff
│ ├── Inter-Thin.woff2
│ └── Inter-roman.var.woff2
├── humans.txt
├── icons
│ ├── showcase
│ │ ├── crown.svg
│ │ ├── dino.svg
│ │ ├── monitor.svg
│ │ ├── textsnatcher.svg
│ │ ├── timeshift.png
│ │ ├── tuba.svg
│ │ └── workbench.svg
│ └── spritemap.svg
├── img
│ ├── showcase
│ │ ├── crown.png
│ │ ├── dino.png
│ │ ├── monitor.png
│ │ ├── textsnatcher.png
│ │ ├── timeshift.png
│ │ ├── tuba.png
│ │ └── workbench.png
│ └── vala-hero-wide.png
├── js
│ └── global.js
├── manifest.json
├── ms-icon-144x144.png
├── ms-icon-150x150.png
├── ms-icon-310x310.png
└── ms-icon-70x70.png
├── syntaxes
└── vala.sublime-syntax
└── templates
├── 404.html
├── anchor-link.html
├── base.html
├── blog-post.html
├── blog.html
├── index.html
├── macros
├── blog.html
├── body.html
├── head.html
└── icon.html
├── page.html
├── partials
├── blog
│ └── latest_blog_posts.html
├── community.html
├── features.html
├── footer.html
├── showcase.html
├── usages.html
└── versions.html
└── shortcodes
└── predefined_cta_stack.html
/.devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Zola Dev Container",
3 | "build": { "dockerFile": "Dockerfile" },
4 | "forwardPorts": [1111],
5 | "workspaceFolder": "/app",
6 | "mounts": ["source=.", "target=/app", "type=bind", "consistency=cached"],
7 | "appPort": [1111],
8 | "remoteUser": "vscode"
9 | }
10 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [js]
12 | indent_size = 4
13 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-website.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches: main
4 | name: Build and deploy GH Pages
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 | if: github.ref == 'refs/heads/main'
9 | steps:
10 | - name: checkout
11 | uses: actions/checkout@v2
12 | - name: build_and_deploy
13 | uses: shalzz/zola-deploy-action@master
14 | env:
15 | # Target branch
16 | PAGES_BRANCH: gh-pages
17 | # Provide personal access token
18 | TOKEN: ${{ secrets.TOKEN }}
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | public/
2 | *~
3 | processed_images
4 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | public
2 | *.html
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": false,
3 | "singleQuote": true
4 | }
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:latest
2 |
3 | # Install zola
4 | RUN apk add zola
5 |
6 | # Set the working directory
7 | WORKDIR /app
8 |
9 | # Copy the application files to the container
10 | COPY . /app
11 |
12 | # Expose 1111 to the host's 1111 port
13 | EXPOSE 1111
14 |
15 | # Define the command to run the application
16 | CMD ["zola", "serve", "--interface", "0.0.0.0", "--base-url", "/"]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vala on the Web
2 |
3 | Website of the Vala programming language. View the website here: https://vala.dev
4 |
5 | You can contribute to the new documentation website here: https://github.com/vala-lang/vala-docs
6 |
7 | ## Reporting bugs and requesting features
8 |
9 | Feel free to [create a new issue](https://github.com/vala-lang/vala-www/issues/new/choose) or [participate in an existing one](https://github.com/vala-lang/vala-www/issues)
10 |
11 | ## System Requirements
12 |
13 | - [Zola](https://www.getzola.org) (Version 0.19.1 or higher)
14 |
15 | ## Getting started
16 |
17 | First, start the development server:
18 |
19 | ```sh
20 | zola serve
21 | ```
22 |
23 | Then you should be able to access the website on your browser by navigating to: [http://127.0.0.1:1111](http://127.0.0.1:1111).
24 |
25 | You can edit the index page by modifying `templates/index.html`. The rest of the pages are defined in `content`.
26 |
27 | ## Translations
28 |
29 | 1. Fork this repository
30 | 2. Work on the translations. The translation strings are in `config.toml`. You can use these resources for help:
31 | - https://www.getzola.org/documentation/content/multilingual/
32 | - https://www.getzola.org/documentation/templates/pages-sections/
33 | 3. For markdown pages (pages in `/content` where the content is written in markdown), you need to create a new markdown file for the translated version e.g. `page-name.{language_code}.md`.
34 | 4. Add your language to the `lang_map` macro in `templates/macros/body.html`
35 | 5. Create a pull request with the changes you've made
36 |
37 | **Important Notes:**
38 |
39 | - You must translate the About page and the Home page
40 | - To translate strings in `config.toml` phrase by phrase, copy and paste the original English translations then replace each phrase over time.
41 | - Feel free to ask for help. You can ask in the issue you created or on the [discussions page](https://www.github.com/vala-www/discussions).
42 |
43 | ## Adding new blog posts
44 |
45 | 1. Inside the `content/blog` directory: create a new markdown file that ends in `.md`, add [front matter](https://www.getzola.org/documentation/content/page/#front-matter) to the file then write the rest of your post below the front matter.
46 | 2. Create a pull request with the changes you've made.
47 |
48 | Note:
49 |
50 | For more information, check out the ["pages" section of the contributor guide](docs/3-pages.md).
51 |
52 | ## Website Documentation
53 |
54 | Check out the [contributor guide](docs/CONTRIBUTING.md) to learn more about how this website works.
55 |
56 | ## Credits
57 |
58 | Various people have contributed to this website in some way and, more people will also help with the project over time.
59 |
60 | The Contributors section in the GitHub repository doesn't tell the whole story. There's a file called `humans.txt` (available in [/static/humans.txt](/static/humans.txt)) where contributor details can be added.
61 |
62 | Feel free to request for your details to be added or add them yourself if you have contributed to this project in any way. This is available for anyone to see if they visit: https://vala.dev/humans.txt.
63 |
64 | You can find out more about humans.txt at: https://humanstxt.org/.
65 |
66 | ## Additional Resources
67 |
68 | - [Zola Documentation](https://www.getzola.org/documentation/getting-started/overview/)
69 | - [Tera Documentation](https://keats.github.io/tera/)
70 | - [MDN Web Docs](https://developer.mozilla.org)
71 |
--------------------------------------------------------------------------------
/assets/code-sample.md:
--------------------------------------------------------------------------------
1 | ```vala
2 | // ExampleApp.vala
3 |
4 | public class ExampleApp : Gtk.Application {
5 | public ExampleApp () {
6 | Object (application_id: "com.example.App");
7 | }
8 |
9 | public override void activate () {
10 | var win = new Gtk.ApplicationWindow (this);
11 |
12 | var btn = new Gtk.Button.with_label ("Hello World");
13 | btn.clicked.connect (win.close);
14 |
15 | win.child = btn;
16 | win.present ();
17 | }
18 |
19 | public static int main (string[] args) {
20 | var app = new ExampleApp ();
21 | return app.run (args);
22 | }
23 | }
24 |
25 | // Compile command (requires gtk4 package to be installed):
26 | // valac --pkg gtk4 ExampleApp.vala
27 | ```
28 |
--------------------------------------------------------------------------------
/assets/showcase-items.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Tuba",
4 | "icon_path": "icons/showcase/tuba.svg",
5 | "url": "https://tuba.geopjr.dev/",
6 | "screenshot_path": "/img/showcase/tuba.png",
7 | "description": "Browse the Fediverse"
8 | },
9 | {
10 | "name": "Workbench",
11 | "icon_path": "icons/showcase/workbench.svg",
12 | "url": "https://apps.gnome.org/Workbench/",
13 | "screenshot_path": "/img/showcase/workbench.png",
14 | "description": "Learn and prototype with Vala and other GNOME technologies"
15 | },
16 | {
17 | "name": "Dino",
18 | "icon_path": "icons/showcase/dino.svg",
19 | "url": "https://dino.im/",
20 | "screenshot_path": "/img/showcase/dino.png",
21 | "description": "A modern open-source chat client for the desktop. Focuses on providing a clean and reliable Jabber/XMPP experience while having your privacy in mind."
22 | },
23 | {
24 | "name": "Monitor",
25 | "icon_path": "icons/showcase/monitor.svg",
26 | "url": "https://github.com/stsdc/monitor",
27 | "screenshot_path": "/img/showcase/monitor.png",
28 | "description": "Manage processes and monitor system resources"
29 | },
30 | {
31 | "name": "TextSnatcher",
32 | "icon_path": "icons/showcase/textsnatcher.svg",
33 | "url": "https://github.com/RajSolai/TextSnatcher",
34 | "screenshot_path": "/img/showcase/textsnatcher.png",
35 | "description": "Copy Text from Images with ease, Perform OCR operations in seconds."
36 | },
37 | {
38 | "name": "Timeshift",
39 | "icon_path": "icons/showcase/timeshift.png",
40 | "url": "https://github.com/linuxmint/timeshift",
41 | "screenshot_path": "/img/showcase/timeshift.png",
42 | "description": "System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots."
43 | },
44 | {
45 | "name": "Crown",
46 | "icon_path": "icons/showcase/crown.svg",
47 | "url": "https://www.crownengine.org",
48 | "screenshot_path": "/img/showcase/crown.png",
49 | "description": "Crown is a complete and cross-platform game engine designed for flexibility, performance, and fast-iterations."
50 | }
51 | ]
52 |
--------------------------------------------------------------------------------
/assets/vala-hero-next.svg:
--------------------------------------------------------------------------------
1 |
2 |
361 |
--------------------------------------------------------------------------------
/content/_index.cs.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Programovací jazyk Vala"
3 | template = "index.html"
4 | description = "Vala je objektově orientovaný programovací jazyk s vlastním kompilátorem, který generuje kód v jazyce C a používá typový systém GObject."
5 | insert_anchor_links = "right"
6 | +++
7 |
--------------------------------------------------------------------------------
/content/_index.fr.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Vala Programming Language"
3 | template = "index.html"
4 | description = "Vala est un langage de programmation orienté objet avec un compilateur qui génère du code C et utilise le système de type GObject."
5 | insert_anchor_links= "right"
6 | +++
7 |
--------------------------------------------------------------------------------
/content/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Vala Programming Language"
3 | template = "index.html"
4 | description = "Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject type system."
5 | insert_anchor_links= "right"
6 | +++
7 |
8 |
9 |
--------------------------------------------------------------------------------
/content/_index.pt_BR.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "A Linguagem de Programação Vala"
3 | template = "index.html"
4 | description = "Vala é uma linguagem de programação orientada a objetos com compilador embutido, que gera código C e usa o sistema de tipos GObject."
5 | insert_anchor_links= "right"
6 | +++
7 |
8 |
9 |
--------------------------------------------------------------------------------
/content/_index.ru.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Язык программирования Vala"
3 | template = "index.html"
4 | description = "Vala - это объектно-ориентированный язык программирования с самодостаточным компилятором, который генерирует код Cи и использует систему типов GObject."
5 | insert_anchor_links= "right"
6 | +++
7 |
8 |
--------------------------------------------------------------------------------
/content/_index.zh_CN.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Vala编程语言"
3 | template = "index.html"
4 | description = "Vala 是一种面向对象的编程语言,由自举编译器产生 C 语言代码并使用 GObject 类型系统。"
5 | insert_anchor_links= "right"
6 | +++
7 |
8 |
9 |
--------------------------------------------------------------------------------
/content/about/index.cs.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "O jazyce Vala"
3 | template = "page.html"
4 | insert_anchor_links = "right"
5 | lang = "cs"
6 | description = "Vala je objektově orientovaný programovací jazyk s vlastním kompilátorem, který generuje kód v jazyce C a používá typový systém GObject."
7 | +++
8 |
9 |
O jazyce Vala
10 |
11 | ## Co je Vala?
12 |
13 | Vala je objektově orientovaný programovací jazyk s vlastním kompilátorem, který generuje kód v jazyce C a používá typový systém GObject.
14 |
15 | Vala podporuje moderní jazykové funkce, jako jsou:
16 |
17 | - Rozhraní
18 | - Vlastnosti
19 | - Signály
20 | - Konstrukce Foreach
21 | - Výrazy lambda
22 | - Odvozování typu pro místní proměnné
23 | - Generické typy
24 | - Ne-nullové typy
25 | - Asistovanou správu paměti
26 | - Zacházení s výjimkami
27 | - Typové moduly (pluginy)
28 |
29 | ## Jakým jazykem je Vala?
30 |
31 | ### Produktivní
32 |
33 | S Valou můžete začít pracovat rychle díky praktickým funkcím, jako jsou lambda výrazy, zpracování výjimek, rozhraní a generika.
34 |
35 | ### Výkonný
36 |
37 | Kód Vala se zkompiluje na plně nativní binární soubory.
38 |
39 | ### Staticky typovaný
40 |
41 | Vala vám pomůže psát typově bezpečný kód bez zbytečných slov, a to díky odvozování typů.
42 |
43 | ### Integrativní
44 |
45 | Vala je navržena tak, aby umožňovala přístup k existujícím knihovnám jazyka C, zejména ke knihovnám založeným na GObject, bez nutnosti runtime vazeb. Vše, co je potřeba k použití knihovny s Valou, je soubor API obsahující deklarace tříd a metod v syntaxi Vala. Vala v současné době obsahuje vazby pro GLib a GTK+ a mnoho dalších z platformy GNOME.
46 |
47 | Vala lze použít k vytváření knihoven také v jazyce C.
48 |
49 | ### Známý
50 |
51 | Syntaxe jazyka Vala je inspirována jazyky C# a Java, takže pokud jste některý z nich používali, snadno se přizpůsobíte psaní kódu jazyka Vala.
52 |
53 | {{ predefined_cta_stack() }}
54 |
--------------------------------------------------------------------------------
/content/about/index.fr.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "À propos de Vala"
3 | template = "page.html"
4 | insert_anchor_links = "right"
5 | lang = "fr"
6 | description = "Vala est un langage de programmation orienté objet avec un compilateur qui génère du code C et utilise le système de type GObject."
7 | +++
8 |
9 |
À propos de Vala
10 |
11 | ## Qu'est-ce que Vala ?
12 |
13 | Vala est un langage de programmation orienté objet avec un compilateur qui génère du code C et utilise le système de type GObject.
14 |
15 |
16 | Vala prend en charge les fonctionnalités de langage moderne telles que :
17 |
18 | - Interfaces
19 | - Properties
20 | - Signals
21 | - Foreach statements
22 | - Lambda expressions
23 | - Type inferencing for local variables
24 | - Generics
25 | - Non-null types
26 | - Assisted memory management
27 | - Exception handling
28 | - Type modules (Plugins)
29 |
30 | ## Quel genre de langue est Vala?
31 |
32 | ### Productif
33 |
34 | Avec Vala, vous pouvez être opérationnel rapidement, grâce à des fonctionnalités pratiques telles que les expressions lambda, la gestion des exceptions, les interfaces et les génériques.
35 |
36 | ### Performant
37 |
38 | Le code Vala se compile en binaires entièrement natifs.
39 |
40 | ### Statically-Typed
41 |
42 | Vala vous aide à écrire du code de type sécurisé sans verbosité, grâce à l'inférence de type.
43 |
44 | ### Integrative
45 |
46 | Vala est conçu pour permettre l'accès aux bibliothèques C existantes, en particulier les bibliothèques basées sur GObject, sans avoir besoin de liaisons d'exécution. Tout ce qui est nécessaire pour utiliser une bibliothèque avec Vala est un fichier vapi, contenant les déclarations de classe et de méthode dans la syntaxe Vala. Vala est actuellement livré avec des liaisons pour GLib et GTK + et bien d'autres de la plate-forme GNOME.
47 |
48 | Vala peut également être utilisé pour créer des bibliothèques C.
49 |
50 | ### Familiar
51 |
52 | La syntaxe de Vala est inspirée de C # et Java, donc si vous avez utilisé l'un ou l'autre, vous vous adapterez de manière transparente à l'écriture de code Vala.
53 |
54 | {{ predefined_cta_stack() }}
55 |
--------------------------------------------------------------------------------
/content/about/index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "About Vala"
3 | template = "page.html"
4 | insert_anchor_links = "right"
5 | description = "Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject type system."
6 | +++
7 |
8 |
About Vala
9 |
10 | ## What is Vala?
11 |
12 | Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject type system.
13 |
14 | Vala supports modern language features such as:
15 |
16 | - Interfaces
17 | - Properties
18 | - Signals
19 | - Foreach statements
20 | - Lambda expressions
21 | - Type inferencing for local variables
22 | - Generics
23 | - Non-null types
24 | - Assisted memory management
25 | - Exception handling
26 | - Type modules (Plugins)
27 |
28 | ## What kind of language is Vala?
29 |
30 | ### Productive
31 |
32 | With Vala, you can get up and running quickly, thanks to convenient features like lambda expressions, exception handling, interfaces and generics.
33 |
34 | ### Performant
35 |
36 | Vala code compiles down to fully native binaries.
37 |
38 | ### Statically-Typed
39 |
40 | Vala helps you write type-safe code without the verbosity, thanks to type inference.
41 |
42 | ### Integrative
43 |
44 | Vala is designed to allow access to existing C libraries, especially GObject-based libraries, without the need for runtime bindings. All that is needed to use a library with Vala is an API file, containing the class and method declarations in Vala syntax. Vala currently comes with bindings for GLib and GTK+ and many others from the GNOME Platform.
45 |
46 | Vala can also be used to create C libraries too.
47 |
48 | ### Familiar
49 |
50 | The syntax of Vala is inspired by C# and Java, so if you have used either of those, you'll seamlessly adapt to writing Vala code.
51 |
52 | {{ predefined_cta_stack() }}
53 |
--------------------------------------------------------------------------------
/content/about/index.pt_BR.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Sobre o Vala"
3 | template = "page.html"
4 | insert_anchor_links = "right"
5 | description = "Vala é uma linguagem de programação orientada a objetos com compilador embutido, que gera código C e usa o sistema de tipos GObject."
6 | +++
7 |
8 |
Sobre o Vala
9 |
10 | ## O que é Vala?
11 |
12 | Vala é uma linguagem de programação orientada a objetos com compilador embutido, que gera código C e usa o sistema de tipos GObject.
13 |
14 | Vala suporta funcionalidades de linguagens de programação moderna, como:
15 |
16 | - Interfaces
17 | - Propriedades
18 | - Sinais
19 | - Declaração Foreach
20 | - Expressões Lambda
21 | - Inferência de tipo para variáveis locais
22 | - Programação genérica
23 | - Tipos Non-null
24 | - Gerenciamento de memória assistido
25 | - Tratamento de exceção
26 | - Módulos (Plugins)
27 |
28 | ## Que tipo de linguagem é Vala?
29 |
30 | ### Produtiva
31 |
32 | Com Vala, você pode entrar em operação rapidamente, graças a funcionalidades convenientes como expressões lambda, tratamento de exceção, interfaces e programação genérica.
33 |
34 | ### Performante
35 |
36 | Código Vala compila para binários inteiramente nativos.
37 |
38 | ### Estaticamente-Tipada
39 |
40 | Vala te ajuda a escrever código de tipagem segura, sem verbosidade, graças à inferência de tipos.
41 |
42 | ### Integrativo
43 |
44 | Vala é projetada para permitir acesso a bibliotecas C existentes, especialmente bibliotecas baseadas em GObject, sem a necessidade de bindings em tempo de execução. Tudo o que é necessário para usar uma biblioteca com Vala é um arquivo API, contendo as declarações de classe e método na sintaxe Vala. Vala atualmente vem com bindings para GLib e GTK+ e muitos outros para a Plataforma GNOME.
45 |
46 | Vala também pode ser utilizada para criar bibliotecas C.
47 |
48 | ### Familiar
49 |
50 | A sintaxe de Vala é inspirada em C# e Java, de modo que se você já usou alguma delas, você se adaptará perfeitamente à escrita de código Vala.
51 |
52 | {{ predefined_cta_stack() }}
53 |
--------------------------------------------------------------------------------
/content/about/index.ru.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "О Vala"
3 | template = "page.html"
4 | insert_anchor_links = "right"
5 | description = "Vala - это объектно-ориентированный язык программирования с самодостаточным компилятором, который генерирует код Cи и использует систему типов GObject."
6 | +++
7 |
8 |
О Vala
9 |
10 | ## Что такое Vala?
11 |
12 | Vala - это объектно-ориентированный язык программирования с самодостаточным компилятором, который генерирует код Cи и использует систему типов GObject.
13 |
14 | Vala поддерживает современные языковые функции, такие как:
15 |
16 | - Интерфейсы
17 | - Свойства
18 | - Сигналы
19 | - Foreach
20 | - Лямбда-выражения
21 | - Вывод типа для локальных переменных
22 | - Дженерики
23 | - Ненулевые типы
24 | - Лёгкое управление памятью
25 | - Обработка исключений
26 | - Типы модулей (плагины)
27 |
28 | ## Почему Vala?
29 |
30 | ### Производительный
31 |
32 | С Vala вы можете быстро приступить к работе благодаря таким удобным функциям, как лямбда-выражения, обработка исключений, интерфейсы и дженерики.
33 |
34 | ### Быстрый
35 |
36 | Код Vala компилируется в полностью нативные двоичные файлы.
37 |
38 | ### Статически типизированный
39 |
40 | Vala помогает вам писать безопасный код без хлопот, благодаря выводу типов.
41 |
42 | ### Интегрированный
43 |
44 | Vala предназначен для обеспечения доступа к существующим библиотекам Cи, особенно к библиотекам на основе GObject, без необходимости привязок во время выполнения. Все, что необходимо для использования библиотеки Vala - это файл API, содержащий объявления классов и методов в синтаксисе Vala. В настоящее время Vala поставляется с привязками для GLib и GTK+ и многими другими библиотеками с платформы GNOME.
45 |
46 | Vala также можно использовать для создания библиотек языка Си.
47 |
48 | ### Знакомый
49 |
50 | Синтаксис Vala вдохновлен C# и Java, поэтому, если вы использовали любой из них, вы с легкостью адаптируетесь к написанию кода на Vala.
51 |
52 | {{ predefined_cta_stack() }}
53 |
--------------------------------------------------------------------------------
/content/about/index.zh_CN.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "关于 Vala"
3 | template = "page.html"
4 | lang = "zh_CN"
5 | insert_anchor_links = "right"
6 | description = "Vala 是一种面向对象的编程语言,具有自托管编译器,可生成 C 代码并使用 GObject 类型系统。"
7 | +++
8 |
9 |
关于 Vala
10 |
11 | ## 什么是 Vala?
12 |
13 | Vala 是一种面向对象的编程语言,具有自托管编译器,可生成 C 代码并使用 GObject 类型系统。
14 |
15 | Vala 支持现代语言特性,例如:
16 |
17 | - 接口
18 | - 属性
19 | - 信号
20 | - Foreach 语句
21 | - Lambda 表达式
22 | - 局部变量的类型推断
23 | - 泛型
24 | - 非空(Non-null)类型
25 | - 辅助内存管理
26 | - 异常处理
27 | - 类型模块(插件)
28 |
29 | ## Vala 是什么语言?
30 |
31 | ### 高效
32 |
33 | 使用 Vala,您可以快速启动并运行,这要归功于 lambda 表达式、异常处理、接口和泛型等方便的功能。
34 |
35 | ### 高性能
36 |
37 | Vala 代码编译成完全原生的二进制文件。
38 |
39 | ### 静态类型
40 |
41 | 由于类型推断,Vala 可以帮助您编写类型安全的代码而不会冗长。
42 |
43 | ### 整合
44 |
45 | Vala 旨在允许访问现有的 C 库,尤其是基于 GObject 的库,而无需运行时绑定。 使用带有 Vala 的库所需的全部是一个 API 文件,其中包含 Vala 语法中的类和方法声明。 Vala 当前附带了 GLib 和 GTK+ 以及 GNOME 平台的许多其他绑定。
46 |
47 | Vala 也可以用来创建 C 库。
48 |
49 | ### 熟悉
50 |
51 | Vala 的语法受到 C# 和 Java 的启发,因此如果您使用过其中任何一个,您将无缝地适应编写 Vala 代码。
52 |
53 | {{ predefined_cta_stack() }}
54 |
--------------------------------------------------------------------------------
/content/blog/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Blog"
3 | template = "blog.html"
4 | description = "Welcome to the Vala Blog"
5 | page_template = "blog-post.html"
6 | sort_by = "date"
7 | paginate_by = 10
8 | paginate_path = "page"
9 | insert_anchor_links = "right"
10 | +++
11 |
12 |
--------------------------------------------------------------------------------
/content/blog/planet-gnome.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "print(\"Hello Planet GNOME\");"
3 | date = "2023-10-11"
4 | description="Posts from the Vala blog are now appearing on Planet GNOME!"
5 |
6 | [extra]
7 | authors = ["Lorenz Wildberg"]
8 | +++
9 |
10 | Hello to all of you reading [Planet GNOME](https://planet.gnome.org/) right now! This is the first post from the [Vala Blog](https://vala.dev/blog/) now appearing in the big wide world of GNOME.
11 |
12 | Big thanks to the Planet GNOME team and Felipe Borges for making this possible!
13 |
14 | This blog is operated by the Vala project and we are posting here once in a while about new Vala releases, noteworthy changes like new features and how to use them, interesting projects using Vala and their experience with it and other stuff related to the Vala programming language.
15 |
16 | If you have an idea to write about something that fits one of the categories above, reach out to us and we are sure eventually a great article will be released! (Talk to us [here](https://vala.dev/#community))
17 |
18 | Stay tuned for the next posts coming out! :)
19 |
--------------------------------------------------------------------------------
/content/blog/vala-0-56.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Vala 0.56"
3 | date = "2022-03-18"
4 | description="Here's what's new in Vala release version 0.56"
5 |
6 | [extra]
7 | authors = ["Lorenz Wildberg"]
8 | +++
9 |
10 | After 4 months of work we are proud to announce a new release of Vala. This time it contains lots of new language features and advancements and of course also the usual bug fixes and binding updates.
11 |
12 | ## Asynchronous Main Function
13 |
14 | With the new release the main function can now be defined as `async`. This has multiple advantages. For example is it now possible to call asynchronous functions with `yield`:
15 |
16 | ```vala
17 | async int main (string[] args) {
18 | string dir = args.length == 2 ? args[1] : ".";
19 | var file = File.new_for_commandline_arg (dir);
20 | try {
21 | FileEnumerator enumerator =
22 | yield file.enumerate_children_async (
23 | "standard::*,time::*",
24 | FileQueryInfoFlags.NOFOLLOW_SYMLINKS
25 | );
26 | List children =
27 | yield enumerator.next_files_async (int.MAX);
28 | print ("total %lu\n", children.length ());
29 | foreach (var info in children) {
30 | //
31 | print ("%26s %24s %10"+int64.FORMAT+" B %s\n",
32 | info.get_content_type (),
33 | info.get_access_date_time ().to_string (),
34 | info.get_size (),
35 | info.get_name ());
36 | }
37 | } catch (Error e) {
38 | printerr ("failed to enumerate files - %s\n", e.message);
39 | return 1;
40 | }
41 | return 0;
42 | }
43 | ```
44 | In main blocks (experimental feature that allows it to write code in a file without putting in a main function) invoking functions with `yield` is also supported by making the main block automatically asynchronous.
45 |
46 | Merge Request [#226](https://gitlab.gnome.org/GNOME/vala/-/merge_requests/226)
47 |
48 | ## Nested functions
49 |
50 | A simple but very useful feature is to be able to nest functions inside of other functions or methods. These functions are then only visible to the code in the function that contains the nested one. But on the other way the code in the nested function has access to variables in the upper method. Actually they are only lambdas assigned to a local variable.
51 |
52 | Use cases are to structure very complicated functions into multiple smaller ones, without exposing them publicly. In this example the same asynchronous callback is used for two invocations, in which you otherwise would use lambdas:
53 |
54 | ```vala
55 | void write_streams (OutputStream stream1, OutputStream stream2, uint8[] data) {
56 | void nested_function (Object object_source, AsyncResult result) {
57 | OutputStream stream = object_source as OutputStream;
58 | try {
59 | ssize_t size = stream.write_async.finish (result);
60 | stdout.printf (@"Written $size bytes\n");
61 | } catch (Error e) {
62 | stderr.printf ("Error writing to stream: %s", e.message);
63 | }
64 | }
65 |
66 | stream1.write_async (data, nested_function);
67 | stream2.write_async (data, nested_function);
68 | }
69 |
70 | ```
71 |
72 | Merge Request [#203](https://gitlab.gnome.org/GNOME/vala/-/merge_requests/203)
73 |
74 | ## Redesign of error and warning output
75 |
76 | If programming errors are outputted at compile time in a pretty way and provide as much information as possible, they massively help and speed up finding the mistakes and correcting them. In the new release this part got an update. Look at the differences yourself:
77 |
78 | Before Vala 0.56:
79 |
80 | ```vala
81 | int foo = bar();
82 | ^^^
83 | ```
84 |
85 | Vala 0.56:
86 |
87 | ```vala
88 | 2 | int foo = bar();
89 | | ^~~
90 |
91 | ```
92 |
93 | What looks better? :)
94 |
95 | Issue [#764](https://gitlab.gnome.org/GNOME/vala/-/issues/764)
96 |
97 | ## Dynamic invocation of Signals
98 |
99 | Libraries using the GObject type system are providing usually documentation about their API so other languages can use them. However sometimes some parts are missing. With the `dynamic` keyword an object can be treated as not having all properties or signals specified and they can be accessed dynamically without checking:
100 |
101 | ```vala
102 | dynamic Gst.Element appsink = Gst.ElementFactory.make ("appsink", "my_src");
103 | appsink.max_buffers = 0;
104 | appsink.eos.connect (on_eos);
105 | Gst.Sample? res = appsink.pull_sample.emit ();
106 |
107 | ```
108 |
109 | As you can see, signals are now also callable with `.emit ()`. This is necessary to differentiate between a method or a dynamic signal. But this syntax can be also used with non-dynamic variables if wanted.
110 |
111 | Merge Request [#227](https://gitlab.gnome.org/GNOME/vala/-/merge_requests/227)
112 |
113 | ## Partial classes
114 |
115 | In rare cases, if a class is so huge and complex, it can be now split up into multiple pieces even into multiple files. All parts of the class only need the partial keyword in front of it.
116 |
117 | ```vala
118 | public partial class Foo : Object {
119 | public double bar { get; set; }
120 | }
121 |
122 | public partial class Foo : Initable {
123 | public virtual bool init (Cancellable? cancellable = null) {
124 | stdout.printf ("hello!\n");
125 | this.bar = 0.56;
126 | return true;
127 | }
128 | }
129 |
130 | ```
131 |
132 | Merge Request [#200](https://gitlab.gnome.org/GNOME/vala/-/merge_requests/200)
133 |
134 | ## Length-type for Arrays
135 |
136 | The length of an array is usually specified by an 32bit integer. However in some cases, especially in bindings to other libaries, sometimes the length of an array is given by a different type of integer. We now have support for that:
137 |
138 | ```vala
139 | string[] list = new string[10:uint8];
140 | ```
141 |
142 | Issue [#607](https://gitlab.gnome.org/GNOME/vala/-/issues/607)
143 |
144 | ## Foreach support on Glib.Sequence and Glib.Array
145 |
146 | This small change will be a big improvement for users of these data structures. Instead of manually looping with for, they are now ready to be used with a foreach loop over the items in the sequence or array.
147 |
148 | Merge Request [#234](https://gitlab.gnome.org/GNOME/vala/-/merge_requests/234)
149 |
150 | ## New Bindings
151 |
152 | A bunch of new bindings to libraries got added this release. Here is a list:
153 |
154 |
155 | - libsoup is now also available in version 3.0 and webkit2gtk in version 4.1 and 5.0 so you can start porting you Vala apps to the new releases of these libraries
156 | - linux-media can now be used from Vala. There were also lots of more additions and fixes in other linux kernel interface bindings.
157 | - During the port of the gnome-desktop library it was splitted up into gnome-desktop-4, gnome-rr-4 and gnome-bg-4. They are all now available to use in your new app.
158 | - The GLib vapi was updated to version 2.72, including the new Signal- and BindingGroups and DebugController
159 |
160 | ## GNOME Getting started tutorial
161 |
162 | The GNOME developer documentation has besides other stuff a excellent section on getting started with GTK and app development. Most of the [tutorials](https://developer.gnome.org/documentation/tutorials.html) there have now code examples in Vala. So read it and write your first Vala application! :)
163 |
164 | ## Vala Flatpak Sdk Extension
165 |
166 | You can find on flathub now the `org.freedesktop.Sdk.Extension.vala` Extension. It contains the Vala compiler, language server and more tooling. You can use it either for compiling your Vala app, or if you need for example the language server at runtime, like an IDE. Instructions can be found at the [flathub repository](https://github.com/flathub/org.freedesktop.Sdk.Extension.vala).
167 |
168 | ## Google Summer of Code
169 |
170 | We have proposed a project idea for the Google Summer of Code for working on Vala. If you are interested, check out the [project ideas page](https://discourse.gnome.org/t/gsoc-2022-project-ideas/8931#add-support-for-the-latest-gir-attributes-and-gi-docgen-formatting-to-valadoc-15) on GNOME discourse.
171 |
172 | ---
173 |
174 | You are always invited to join our matrix chat [#vala:gnome.org](https://matrix.to/#/#_gimpnet_#vala:gnome.org) and ask questions about Vala or how to contribute. Until then, have a nice time and build great apps with Vala!
175 |
--------------------------------------------------------------------------------
/content/blog/valabot.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "ValaBot: an AI coding assistant fine-tuned for Vala"
3 | date = "2024-05-09"
4 | description="An AI coding assistant fine-tuned for Vala and Gtk"
5 |
6 | [extra]
7 | authors = ["Sam Cowen"]
8 | +++
9 |
10 | ## Enhancing AI Coding Assistants for Vala Developers
11 |
12 | As a programmer, I've been impressed by AI coding assistants like GitHub Copilot and Codeium, which have significantly boosted my productivity. These tools excel at reducing disruptive interruptions, saving time on typing, and often completing lines of code accurately. However, I've encountered limitations with Copilot while working with the Vala programming language. Its suggestions often get muddled with similar languages like Java and C#, and it lacks training on the more common Vala libraries.
13 |
14 | Like many other developers, I'm also dissatisfied with the dominance of Github Copilot and that open source code has been monetized without attribution or consideration for the original authors (some of whom now pay for the service).
15 |
16 | This challenge inspired me to enhance the Copilot concept by creating an AI coding assistant that is finely tuned to provide a viable and superior alternative that caters for the specific needs of Vala developers. I began with an open-source Large Language Model that had been trained on source code - the powerful Deepseek Coder 6.7b model. This model has been trained from scratch by Deepseek AI on 2 trillion tokens sourced from GitHub. Deepseek Coder significantly outperforms other open-source coding models, such as Codellama.
17 |
18 | I chose the Deepseekcoder-6.7b-base model as the foundation for fine-tuning because of its great benchmark performance and also because it was trained on Java and C# – languages syntactically close to Vala. This allowed me to build upon its existing capabilities and adapt it to the specific needs of Vala.
19 |
20 | ## Fine-Tuning for Vala
21 |
22 | I fine-tuned the model on Vala programming language datasets. This involved downloading as many Vala projects as I could find from GitHub, extracting the Vala source files, and splitting them into ~40 line segments. I then used Llama3 to create logical and predictable "holes" in each segment, which were then used to create the FIM (fill-in-the-middle) dataset. This data preparation process took 96 hours of GPU time using my quad-RX6800 machine over a weekend. The resulting dataset was cleaned to remove non-code elements, such as license headers, and personal identifiable information.
23 |
24 | ## The Training
25 |
26 | The fine-tuning process took 10 hours on an RTX 3090. The result was a LoRA, which was merged back into the base model, converted to GGUF, and quantized to q8_0, which is the format required by TabbyML.
27 |
28 | ## The Result
29 |
30 | The outcome was a model that is more helpful and productive for Vala-related projects. By fine-tuning Deepseek Coder, I was able to create a more accurate and effective AI coding assistant that understands the nuances of the Vala programming language. The model is hosted on Huggingface (). It can be used in VSCode, VIM, and other popular IDEs with TabbyML. The complete instructions, training scripts, and dataset are available on GitHub ().
31 |
32 | ## Licensing and Fair Use
33 |
34 | As a project rooted in the principles of Free and Open-Source Software (FOSS), I believe in promoting freedom, community, and sharing knowledge. To facilitate collaboration and innovation, I've made the following resources publicly available:
35 |
36 | * The fine-tuned model weights are hosted on Hugging Face for anyone to access and utilize in a TabbyML or other deployment.
37 | * The training scripts and dataset preparation process are open-sourced on GitHub, providing a transparent and reproducible framework for others to build upon.
38 | * A comprehensive list of repositories used during the fine-tuning process is available on GitHub, ensuring that contributors and users can easily identify and explore the sources that made this project possible.
39 |
40 | I hope that this openness will pave the way for further advancements and refinements, ultimately benefiting the Vala developer community as a whole.
41 |
42 | ## Conclusion
43 |
44 | In this blog post, I've shared my experience with fine-tuning the Deepseek Coder for the Vala programming language, demonstrating how targeted adjustments can significantly enhance AI coding assistants. This project is just the beginning. I aim to continue developing models specifically optimized for Vala to support the Vala developer community. With the release of new base models, such as CodeQwen 7B, there are exciting possibilities for further advancements. Through this work, I hope to highlight the potential of AI fine-tuning in creating more effective coding assistants and inspire others to explore the possibilities of AI-assisted coding.
45 |
46 | Get started with ValaBot here:
47 |
--------------------------------------------------------------------------------
/content/vala-hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vala-lang/vala-www/ec9b2a809f78945eaf218fb77ae91f9d5489b494/content/vala-hero.png
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | man:
4 | build: .
5 | image: vala-website
6 | ports:
7 | - "1111:1111"
8 | volumes:
9 | - .:/app
--------------------------------------------------------------------------------
/docs/1-overview.md:
--------------------------------------------------------------------------------
1 | # Overview
2 |
3 | ## Website Goals
4 |
5 | - Be Vala's offical presence on the internet
6 | - Advertise Vala in an attractive way
7 | - Encourage people to learn Vala
8 | - Increase the amount of traffic to Vala's source code repository
9 | - Provide an open space for the community to produce Vala content with creative freedom
10 |
11 | ## Codebase Goals
12 |
13 | - Be as accessible as possible to contributors - Make it easy as possible for new people to contribute to the website.
14 | - Long-term maintainablitliy - Even after a long period of time, contributing to the website should still be a fast and seamless experience
15 |
16 | ## Technical Details
17 |
18 | - The website is a static site and is generated using [Zola](https://www.getzola.org/)
19 | - Extremely fast (written in Rust)
20 | - Is a single binary with no dependencies (Very simple to install)
21 | - Pages templates are powered by the [Tera templating engine](https://keats.github.io/tera/)
22 | - Page content is written using the [CommonMark](https://commonmark.org/) implementation of [markdown](https://daringfireball.net/projects/markdown/)
23 | - Markdown files are human readable
24 | - Simple syntax
25 | - Well-documented
26 | - [Sass](https://sass-lang.com/) is used for preprocessed styles:
27 | - Spliting styles across so that it's easier to make changes to specific places.
28 | - Taking advantage of preprocessing (calculations and variable substitutions during builds etc.)
29 | - Note: As of 2022-06-28, Zola uses libsass internally which doesn't support the latest Sass features
30 | - The rest of the site uses the standard trio of [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML), [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) and [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
31 |
32 |
33 | ## Using Different Technologies
34 |
35 | The solution was picked for the website in order to achieve the [codebase goals](#codebase-goals).
36 |
37 | If you feel like there are better tools out there that can be used to achieve these goals, feel free to suggest them.
38 |
--------------------------------------------------------------------------------
/docs/2-structure.md:
--------------------------------------------------------------------------------
1 | # Structure
2 |
3 | ## Directories
4 |
5 | - `.github` - GitHub-specific data is stored here like the [GitHub Pages Zola deploy action](https://github.com/shalzz/zola-deploy-action).
6 | - `assets/` - Files that aren't deployed with the website but are used to generate pages in the website.
7 | - `content/` - Here's where the content of pages is written with Markdown. Sections are defined here tohttps://github.com/shalzz/zola-deploy-action). There are more about this available here: https://www.getzola.org/documentation/content/overview/
8 | - `blog/` - Vala Blog content. All the blog posts are stored under here.
9 | - `about/` - About page contnet.
10 | - `docs/` - The directory where this guide you are reading is under.
11 | - `sass/` - Where sass code is stored. The `css/` folder inside there is intentional as it copies the sass output straight to the `static/` folder.
12 | - `css/components/` - Contains files used to style small, specific parts of markup used across the entire site.
13 | - `css/utils/` - Utilties to be used in other sass files.
14 | - `static/` - Here are the assets stored that will be deployed with the website. The files in the root of the static folder will be located in the root of the website when deployed.
15 | - `./` - (The root). The favicon, platform icons and `manifest.json` file for the website is stored here.
16 | - `css/` - CSS files are stored here. There are also generated syntax stylesheets stored here with the pattern: "syntax-theme.{color-scheme}.css". If you change the highlighting theme settings in Zola, you may need to remove these first to see the changes.
17 | - `fonts/` - There is one variable font named `Inter-roman.var.woff2`. The rest of the files are all Inter fonts for different font weights if a browser doesn't support variable fonts. We use both `.woff` and `.woff2` fonts for better browser compatibility.
18 | - `icons/` - spritemap (containing icons used throughout the website) and showcase icons are stored here
19 | - `showcase/` - Showcase icons
20 | - `img/` - These are generic images used in the website. `vala-hero-wide.png` is used in link embeds and `vala-hero` is the default image used for posts on the website.
21 | - `js/` - JavaScript files used in the website.
22 | - `syntaxes/` - Custom syntaxes that aren't included with [Zola's built-in syntax highlighter](https://www.getzola.org/documentation/content/syntax-highlighting/) are stored here. Note: Vala's syntax can be added to Zola by default by creating an issue in the [Zola repo](https://github.com/getzola/zola)
23 | - `templates/` - This is where the majority of markup of the website is written using Tera. Templates are explained in detail here: https://www.getzola.org/documentation/templates/overview/
24 | - `macros` - Contains files that with macros that generate markup based in data you pass in when you call them.
25 | - `partials` - Similar to `macros` but only a file can be a partial. There can't be multiple partials in one file and you can't pass in data when including the partial to your template.
26 | - `shortcodes` - Markdown or tera temlpate code that is called from your content markdown.
27 |
28 | ## Root files
29 |
30 | - **`config.toml`** - Configuration file for Zola. Features The site's URL, markdown settings and custom variables. More information about this file is availble here: https://www.getzola.org/documentation/getting-started/configuration/
31 | - `.editorconfig` - Cross-editor settings for keeping consistent formatting.
32 | - `.gitignore` - Defines files and directories that git should ignore.
33 | - `.prettierignore` - Defines files and directories that prettier should ignore.
34 | - `.prettierrc` - Defines overrides for how prettier should format code in this repository.
35 | - `LICENSE` - The website's license information.
36 | - `README.md` - The repository's README file. The first file we expect people to read to understand the repository. The contents of this file may be shown in this repository's page in codeforges such as GitHub, GitLab, etc.
37 |
--------------------------------------------------------------------------------
/docs/3-pages.md:
--------------------------------------------------------------------------------
1 | # Pages
2 |
3 | ## Creating pages
4 |
5 | ### Strategy
6 |
7 | If your page is structured like a post (e.g About page, blog posts, etc), you should opt create the majority of the content in markdown under its own directory under `content/` and use an existing template. Only create a new template if an existsing one doesn't meet your needs or can't be modified to fit your needs.
8 |
9 | For pages that making heavy use of HTML, macros and/or partials, you should make create the majority of the content in the template itself like how the home page was made (index.html).
10 | You will still need create a markdown file for it in order to set up the front matter. You just don't need to write any markdown inside of it.
11 |
12 | ### Sections
13 |
14 | Sections have pages under its directory. See `content/blog/_index.md` for an example of them. A section's index page is named `_index.md`.
15 |
16 | ### Pages
17 |
18 | Pages can either have a unique name under a section's directory e.g `content/blog/vala-0.56.md` or be named `index.md`. If named `index.md`, they will have the same URL as the path they are under. The latter option is useful for creating one-off page like the about page (`content/about/index.md`).
19 |
20 | By default, all pages are under the root section which is the website's index page (`content/_index.md`).
21 |
22 | ### Using Components
23 |
24 | There are two types of components you can create:
25 |
26 | 1. Partials - Don't let you pass data in. 1 file = 1 partial.
27 | 2. Macros - Allow you to pass data in. Muliple macros can exist in one file.
28 |
29 | It's up to you how you to decide to use these types of components to build up these pages. Each type has its advantages and disadvantages.
30 |
31 | ### Metadata
32 |
33 | A macros in `head.html` called `og_data` and `og_data_with_image` take care of this for you. It handles the creates the Open Graph tags and adds the description meta tag for you. It's recommended that you assign the parameters to the page/sections's variables in templates you make.
34 |
35 | #### Front Matter
36 |
37 | In all pages make sure that you fill in contain the following fields:
38 | - `title`
39 | - `date` (In the format of YYYY-MM-DD)
40 | - `description`
41 |
42 | These are used when displaying the in link embeds.
43 |
44 | ## Blog
45 |
46 | ### Blog Front Matter
47 |
48 | As well as the [fields to include when creating pages in general](#front-matter), if the article is written from the context of a single person or group of people, you also should inlcude the `extra.authors` field with an array of strings (containg names).
49 |
50 | Filling the `extra.authors` field **is not** mandatory though. By default, the author will be set to "The Vala Team"
51 |
52 | These are used when displaying the posts across the site and also in link embeds.
53 |
54 | ### Blog Post Titles
55 |
56 | You don't need to create a `
` in your markdown content. The value you have set in the `title` field of the front matter will be used in a `