Skip to content

Commit c1980ee

Browse files
committed
Make most of the links relative
1 parent 0cef447 commit c1980ee

33 files changed

+86
-84
lines changed

hugo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ enableRobotsTXT = true
6565
# (Optional, default false) Set HTMl <base> to .Site.BaseURL if enabled. It might be required
6666
# if a subdirectory is used within Hugos BaseURL.
6767
# See https://developer.mozilla.org/de/docs/Web/HTML/Element/base.
68-
geekdocOverwriteHTMLBase = true
68+
# geekdocOverwriteHTMLBase = true
6969

7070
# (Optional, default false) Auto-decrease brightness of images and add a slightly grayscale to avoid
7171
# bright spots while using the dark mode.

hugo/content/docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: "Documentation"
33
weight: 0
44
---
5-
<meta http-equiv="refresh" content="0; url=/docs/introduction/"/>
5+
<meta http-equiv="refresh" content="0; url=./docs/introduction/"/>

hugo/content/docs/introduction/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ Langium is an open source language engineering tool with first-class support for
88

99
### Features
1010

11-
If you need a more detailed list of Langium features, you can find them in the [features section](/docs/features).
11+
If you need a more detailed list of Langium features, you can find them in the [features section](./features).
1212

1313
### Try it out
1414

15-
If you want to see Langium in action, you can follow the [showcases](/showcase) or even the [playground](/playground).
15+
If you want to see Langium in action, you can follow the [showcases](../../showcase) or even the [playground](../../playground).
1616

1717
### Learn Langium
1818

19-
If you are convinced by Langium and want to learn more about it, you can start with the [learn section](/docs/learn).
19+
If you are convinced by Langium and want to learn more about it, you can start with the [learn section](../learn).
2020

2121
### More details
2222

23-
If you are looking for more details about Langium, you can find them in the [reference section](/docs/reference).
23+
If you are looking for more details about Langium, you can find them in the [reference section](../reference).
2424

25-
If you are searching for a certain guide or recipe, you can find them in the [recipes section](/docs/recipes).
25+
If you are searching for a certain guide or recipe, you can find them in the [recipes section](../recipes).

hugo/content/docs/introduction/features.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "Features"
33
weight: 200
4-
url: /docs/features
4+
aliases:
5+
- /docs/features
56
---
67
Designing programming languages from the ground up is hard, independent of whether your language is a "simple" domain specific language or a full-fledged general-purpose programming language.
78
Not only do you have to keep up with the requirements of your domain experts, but you have to deal with all the technical complexity that comes with building a language, including questions such as:
@@ -14,20 +15,20 @@ This is the point where Langium comes into play. Langium aims to lower the barri
1415

1516
In this chapter, you'll get a closer look at the requirements developers usually have to implement by themselves when building a programming language:
1617

17-
- [Language Parsing](#language-parsing)
18-
- [Semantic Models](#semantic-models)
19-
- [Cross References and Linking](#cross-references-and-linking)
20-
- [Workspace Management](#workspace-management)
21-
- [Editing Support](#editing-support)
22-
- [Try it out](#try-it-out)
18+
- [Language Parsing](/docs/introduction/features#language-parsing)
19+
- [Semantic Models](/docs/introduction/features#semantic-models)
20+
- [Cross References and Linking](/docs/introduction/features#cross-references-and-linking)
21+
- [Workspace Management](/docs/introduction/features#workspace-management)
22+
- [Editing Support](/docs/introduction/features#editing-support)
23+
- [Try it out](/docs/introduction/features#try-it-out)
2324

2425
Langium provides out-of-the-box solutions for these problems, with the ability to fine-tune every part of it to fit your domain requirements.
2526

2627
---
2728

2829
## Language Parsing
2930

30-
Programming languages and domain specific languages (DSLs) cannot be parsed using simple regular expressions (RegExp). Instead they require a more sophisticated parsing strategy. To define a custom language in Langium, you interact with a high level representation of your context-free grammar using the [Langium grammar language](/docs/reference/grammar-language), in a similar fashion to EBNF.
31+
Programming languages and domain specific languages (DSLs) cannot be parsed using simple regular expressions (RegExp). Instead they require a more sophisticated parsing strategy. To define a custom language in Langium, you interact with a high level representation of your context-free grammar using the [Langium grammar language](../reference/grammar-language), in a similar fashion to EBNF.
3132

3233
Based on the grammar, Langium is then able to construct a parser which transforms an input string into a semantic model representation. Just as the name suggests, this model captures the essential structure to describe your language.
3334

@@ -101,4 +102,4 @@ The LSP includes commonly used language features, such as code completion, custo
101102

102103
You can try out most of these features using our [showcase](/showcase/) and [playground](/playground/). The languages shown there are written using Langium and integrated in the monaco-editor.
103104

104-
If you're interested in Langium, you can check out our [learning](/docs/learn/workflow) page next. There you'll learn how to get started writing your first language, and to learn more about how Langium can help you achieve your language designing goals.
105+
If you're interested in Langium, you can check out our [learning](../learn/workflow) page next. There you'll learn how to get started writing your first language, and to learn more about how Langium can help you achieve your language designing goals.

hugo/content/docs/introduction/playground.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
title: "Try it out!"
33
weight: 400
44
---
5-
<meta http-equiv="refresh" content="0; url=/playground"/>
5+
<meta http-equiv="refresh" content="0; url=../playground"/>

hugo/content/docs/learn/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Learn Langium"
33
weight: 0
4-
url: /docs/learn
54
---
65
<meta http-equiv="refresh" content="0; url=/docs/learn/workflow/"/>

hugo/content/docs/learn/minilogo/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ By working through each of these tutorials, you'll be learning about:
1919

2020
By the end of this series, you should be equipped to start working on your own language, and also have a pretty good idea for how you can integrate Langium into other projects as well.
2121

22-
With that being said, hop on in to the first guide on [Writing a Grammar in Langium](/docs/learn/minilogo/writing_a_grammar)!
22+
With that being said, hop on in to the first guide on [Writing a Grammar in Langium](./writing_a_grammar)!

hugo/content/docs/learn/minilogo/building_an_extension/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ aliases:
77

88
{{< toc format=html >}}
99

10-
In this tutorial we'll be going over how to build a VSIX extension (VSCode extension) for your Langium-based language. This will allow providing LSP support in VSCode for your language. We'll assume that you've already looked at the previous tutorial, and have had time to read the [guide on bundling](/docs/recipes/code-bundling), so that you're ready to build an extension. At this point we assume that your language is also working, and there are no issues running `npm run langium:generate` or `npm run build`. If there are, you'll want to correct those first.
10+
In this tutorial we'll be going over how to build a VSIX extension (VSCode extension) for your Langium-based language. This will allow providing LSP support in VSCode for your language. We'll assume that you've already looked at the previous tutorial, and have had time to read the [guide on bundling](../../../recipes/code-bundling), so that you're ready to build an extension. At this point we assume that your language is also working, and there are no issues running `npm run langium:generate` or `npm run build`. If there are, you'll want to correct those first.
1111

1212
## Setting up the Scripts
1313

14-
To get started, you'll want to have a language expressed in Langium, such as [Lox](https://github.com/langium/langium-lox) or [MiniLogo](https://github.com/langium/langium-minilogo). If you have been following along with these tutorials, you should already have something ready. If you don't you can also use the default language generated by the yeoman generator for Langium, presented in the [workflow](/docs/learn/workflow/) section.
14+
To get started, you'll want to have a language expressed in Langium, such as [Lox](https://github.com/langium/langium-lox) or [MiniLogo](https://github.com/langium/langium-minilogo). If you have been following along with these tutorials, you should already have something ready. If you don't you can also use the default language generated by the yeoman generator for Langium, presented in the [workflow](../../workflow/) section.
1515

1616
Regardless of what you're working with, you'll want to make sure you have the following scripts in your **package.json**.
1717

@@ -89,4 +89,4 @@ And that's it, at this point you have an extension for your language that you ca
8989

9090
As a quick aside, it's important to keep the extensions that your language recognizes synchronized in both your **package.json** and your **langium-config.json**. If you do make changes to your extensions, it's a good idea to double check that these are both synced up, and to do a full rebuild to get those changes into your extension.
9191

92-
And that's it for building an extension. In the next tutorial, we'll be setting up [Langium + Monaco in the web](/docs/learn/minilogo/langium_and_monaco/).
92+
And that's it for building an extension. In the next tutorial, we'll be setting up [Langium + Monaco in the web](../langium_and_monaco/).

hugo/content/docs/learn/minilogo/customizing_cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ aliases:
77

88
{{< toc format=html >}}
99

10-
In this tutorial, we'll be talking about customizing the command line interface for your language. We recommend reading through previous tutorials about [writing a grammar](/docs/learn/minilogo/writing_a_grammar) and [validation](/docs/learn/minilogo/validation). Once you have a good grasp on those concepts, then you should be all set for setting up a CLI. We will also continue to use the [MiniLogo](https://github.com/langium/langium-minilogo) language as a motivating example.
10+
In this tutorial, we'll be talking about customizing the command line interface for your language. We recommend reading through previous tutorials about [writing a grammar](./writing_a_grammar) and [validation](./validation). Once you have a good grasp on those concepts, then you should be all set for setting up a CLI. We will also continue to use the [MiniLogo](https://github.com/langium/langium-minilogo) language as a motivating example.
1111

1212
## Overview
1313

@@ -17,7 +17,7 @@ Once you have a grammar and some validation in place, you may want to start conf
1717

1818
If you've been using a language built with the yeoman generator for Langium, you should be able to find your CLI defined in **src/cli/index.ts**. This file describes the general layout of your languages's command line interface, and lets you register specific commands. By default, you're provided with a single command for your CLI, the **generate** command.
1919

20-
Much like the command implies, it allows you to take a program written in your DSL, parse it, and traverse the AST to produce some sort of generated output. We won't talk about the generator itself in this tutorial (that will come in the [next tutorial on generation](/docs/learn/minilogo/generation)). Instead we'll focus on a simple example for parsing and validating a program, which allows learning more about the CLI itself.
20+
Much like the command implies, it allows you to take a program written in your DSL, parse it, and traverse the AST to produce some sort of generated output. We won't talk about the generator itself in this tutorial (that will come in the [next tutorial on generation](./generation)). Instead we'll focus on a simple example for parsing and validating a program, which allows learning more about the CLI itself.
2121

2222
## Adding a Parse and Validate Action
2323

@@ -150,4 +150,4 @@ Running the CLI again should show that this program has an error, and better yet
150150
151151
This is perfect, as we didn't have to implement too much more logic to get validation in our CLI. Since we already hooked up our validation service before, the CLI just handles the interaction with an external program. This separation of concerns makes for a very flexible implementation that is easy to adapt over time.
152152

153-
That sums up how to add basic CLI functionality. [In the next tutorial, we will be talking about generation in more detail](/docs/learn/minilogo/generation), specifically about techniques that you can use to traverse your AST and produce a generated output.
153+
That sums up how to add basic CLI functionality. [In the next tutorial, we will be talking about generation in more detail](./generation), specifically about techniques that you can use to traverse your AST and produce a generated output.

hugo/content/docs/learn/minilogo/generation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ aliases:
77

88
{{< toc format=html >}}
99

10-
In this tutorial we'll be showing how to implement basic generation for your language. When we're talking about generation, we're talking about transforming an AST from your Langium-based language into some output target. This could be another language of similar functionality (transpilation), a lower level language (compilation), or generating some artifacts/data that will be consumed by another application. If you haven't already, make sure to go back over and check out the [tutorial on customizing your CLI](/docs/learn/minilogo/customizing_cli), as it touches on details about how to implement endpoints for your application (like generation).
10+
In this tutorial we'll be showing how to implement basic generation for your language. When we're talking about generation, we're talking about transforming an AST from your Langium-based language into some output target. This could be another language of similar functionality (transpilation), a lower level language (compilation), or generating some artifacts/data that will be consumed by another application. If you haven't already, make sure to go back over and check out the [tutorial on customizing your CLI](./customizing_cli), as it touches on details about how to implement endpoints for your application (like generation).
1111

1212
Per usual, we'll be using the MiniLogo language as a motivating example here.
1313

@@ -377,4 +377,4 @@ If you're looking at the implementation of [MiniLogo that we've already written
377377

378378
We could continue to extend on this with new features, and generate new sorts of output using a given input language. In this tutorial, we're able to take a MiniLogo program and convert it into some simple JSON drawing instructions that can be consumed by another program. This opens the door for us to write such a program in another language, such as Python or Javascript, and draw with these results. In later tutorials, we'll be talking about how to run Langium in the web with generation, so that we can immediately verify our results by drawing on an HTML5 canvas.
379379

380-
We recommend that you next read [the guide on bundling your language with Langium to reduce its size](/docs/recipes/code-bundling), before moving onto the tutorial about [bundling an extension](/docs/learn/minilogo/building_an_extension). This is an important step before deployment as an extension for VSCode, and also if you're planning to later deploy your language in the web.
380+
We recommend that you next read [the guide on bundling your language with Langium to reduce its size](../../recipes/code-bundling), before moving onto the tutorial about [bundling an extension](./building_an_extension). This is an important step before deployment as an extension for VSCode, and also if you're planning to later deploy your language in the web.

0 commit comments

Comments
 (0)