Skip to content

Commit 045c2c8

Browse files
authored
Merge pull request #15 from KubaO/staging
Fix links, add link checker step during build
2 parents 8510636 + e398b4d commit 045c2c8

11 files changed

Lines changed: 264 additions & 242 deletions

File tree

.github/workflows/jekyll-gh-pages.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ jobs:
3737
- name: Setup Pages
3838
id: pages
3939
uses: actions/configure-pages@v5
40+
- name: Write secondary config if available
41+
run: |
42+
echo "${{ vars.JEKYLL_SITE_CONFIG }}" > _site_config.yml
43+
echo "SITE_CONFIG=_site_config.yml" >> "$GITHUB_ENV"
44+
if: ${{ vars.JEKYLL_SITE_CONFIG != '' }}
45+
working-directory: ./docs
4046
- name: Build with Jekyll
41-
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
47+
run: bundle exec jekyll build --config _config.yml,$SITE_CONFIG --baseurl "${{ steps.pages.outputs.base_path }}"
4248
working-directory: ./docs
4349
env:
4450
JEKYLL_ENV: production

docs/CustomControls/Defining a CustomControl.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This method is called when your control is detached from a form. This allows an
5959
Sub Paint(ByVal Canvas As Canvas)
6060
```
6161

62-
This is the most interesting part for a CustomControl. As such, it gets its own section, see [Painting / drawing to your control](/CustomControls/Painting)
62+
This is the most interesting part for a CustomControl. As such, it gets its own section, see [Painting / drawing to your control](Painting)
6363

6464
***
6565
## Minimum set of properties
@@ -78,7 +78,7 @@ Public Visible As Boolean
7878

7979
The form designer and the form engine work with these properties, so it is important to include them in your CustomControl class.
8080

81-
Note that the form designer works with pixel values which are not DPI-scaled. So the Left/Top/Width/Height properties of your control do not reflect DPI scaling. For example, if your control has a width of 50 pixels, then at DPI 150%, then the actual drawing width is 75 pixels ( see [Painting / drawing to your control](/CustomControls/Painting)).
81+
Note that the form designer works with pixel values which are not DPI-scaled. So the Left/Top/Width/Height properties of your control do not reflect DPI scaling. For example, if your control has a width of 50 pixels, then at DPI 150%, then the actual drawing width is 75 pixels ( see [Painting / drawing to your control](Painting)).
8282

8383
***
8484
## Must have a serialization constructor
@@ -88,4 +88,4 @@ CustomControls *must* offer a serialization constructor:
8888
Public Sub New(Serializer As SerializationInfo)
8989
```
9090

91-
The passed in Serializer object offers a `Deserialize()` method that you call in order to load the properties that have been set for your control via the form designer. See [Property Sheet and Object Serialization](/CustomControls/Properties) for further information.
91+
The passed in Serializer object offers a `Deserialize()` method that you call in order to load the properties that have been set for your control via the form designer. See [Property Sheet and Object Serialization](Properties) for further information.

docs/Features/Overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Attributes have two major functions:
2222

2323
* they can act as instructions to compiler to influence how code is generated, or
2424

25-
* to annotate Forms, Modules, Classes, Types, Enums, Declares, and [procedures](/tB/Gloss/#procedure) i.e. Subs/Functions/Properties.
25+
* to annotate Forms, Modules, Classes, Types, Enums, Declares, and [procedures](../tB/Gloss#procedure) i.e. Subs/Functions/Properties.
2626

2727
Previously in VBx, these attributes, such as procedure description, hidden, default member, and others, were set via hidden text the IDE's editor didn't show you, configured via the Procedure Attributes dialog or some other places. In tB, these are all visible in the code editor. The legacy ones from VBx are supported for compatibility, but new attributes utilize the following syntax:\
2828
`[Attribute]` or `[Attribute(value)]`
@@ -1402,15 +1402,15 @@ Code can be grouped as a package, and published to an online server. You can hav
14021402

14031403
For more information, see the following pages:
14041404

1405-
[What is a package](/Packages/What-Is)
1405+
[What is a package](../Packages/What-Is)
14061406

1407-
[Creating a TWINPACK package](/Packages/Creating-TWINPACK)
1407+
[Creating a TWINPACK package](../Packages/Creating-TWINPACK)
14081408

1409-
[Importing a package from a TWINPACK file](/Packages/Importing-TWINPACK)
1409+
[Importing a package from a TWINPACK file](../Packages/Importing-TWINPACK)
14101410

1411-
[Importing a package from TWINSERV](/Packages/Importing-TWINSERV)
1411+
[Importing a package from TWINSERV](../Packages/Importing-TWINSERV)
14121412

1413-
[Updating a package](/Packages/Updating)
1413+
[Updating a package](../Packages/Updating)
14141414

14151415
## View Forms and Packages as JSON
14161416
Project forms and packages are stored as JSON format data, and you can view this by right-click in Project Explorer and selecting 'View as JSON'. This is particularly interesting for packages as it exposes the entire code in a much more easily parsed format.

docs/Miscellaneous/FAQs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Yes, see the [twinBASIC Roadmap](https://github.com/twinbasic/twinbasic/issues/3
6060

6161
**Many!** It has 64bit compilation (using VBA7x64 compatible syntax), generics, overloading, multithreading (API-only right now, built in syntax coming soon), inheritance, ability to define interfaces and coclasses in your project using BASIC-style syntax, Unicode support in all controls and the editor (.twin files only), support for modern image formats, numerous enhancements to *Implements*, ability to create standard DLLs and kernel mode drivers, ability to set UDT packing alignment, and dozens of others, all available *right now*, with many more planned in the future.
6262

63-
For a full list of all the new features available right now, see the Wiki article [Overview of features new to twinBASIC](/Features).
63+
For a full list of all the new features available right now, see the Wiki article [Overview of features new to twinBASIC](Features).
6464

6565
</details>
6666

docs/Reference/Attributes.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permalink: /tB/Core/Attributes
99
Attributes have two major functions:
1010

1111
- they can act as instructions to compiler to influence how code is generated, or
12-
- to annotate Forms, Modules, Classes, Types, Enums, Declares, and [procedures](/tB/Gloss/#procedure) i.e. Subs/Functions/Properties.
12+
- to annotate Forms, Modules, Classes, Types, Enums, Declares, and [procedures](../Gloss#procedure) i.e. Subs/Functions/Properties.
1313

1414
Previously in VBx, these attributes, such as the procedure description, hidden, default member, and others, were set via hidden text the IDE's editor didn't show you, configured via the Procedure Attributes dialog or some other places. In tB, these are all visible in the code editor. The legacy ones from VBx are supported for compatibility, but new attributes utilize the following syntax:
1515
`[Attribute]` or `[Attribute(value)]`
@@ -24,7 +24,7 @@ The available attributes are listed below in alphabetic order. Not every attribu
2424

2525
Syntax: **[AppObject]**
2626

27-
Applicable to: [**CoClass**](/tB/Core/CoClass)
27+
Applicable to: [**CoClass**](CoClass)
2828

2929
Indicates the class is part of the global namespace. You should not include this attribute without a full understanding of the meaning.
3030

@@ -34,7 +34,7 @@ Indicates the class is part of the global namespace. You should not include this
3434

3535
Syntax: **ArrayBoundsChecks( True** \| **False)**
3636

37-
Applicable to: [**Class**](/tB/Core/Class), [**Module**](/tB/Core/Module), [procedure](/tB/Gloss/#procedure)
37+
Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure)
3838

3939
Disables array element access bounds checking. Used on performance-critical routines. The default value is **True**.
4040

@@ -44,7 +44,7 @@ Disables array element access bounds checking. Used on performance-critical rout
4444

4545
Syntax: **[CoClassCustomConstructor("** fully qualified path to factory method **")]**
4646

47-
Applicable to: [**CoClass**](/tB/Core/CoClass)
47+
Applicable to: [**CoClass**](CoClass)
4848

4949
Allows custom logic for creating and returning a new instance of the coclass' implementation.
5050

@@ -59,15 +59,15 @@ Public CoClass Foo
5959
End CoClass
6060
```
6161

62-
For an overview of coclasses in tB, see [Defining coclasses](/Features/Overview/#defining-coclasses).
62+
For an overview of coclasses in tB, see [Defining coclasses](../../Features/Overview#defining-coclasses).
6363

6464
## CoClassId(String)
6565

6666
{: #coclassid }
6767

6868
Syntax: **[CoClassId("**00000000-0000-0000-0000-000000000000**")]**
6969

70-
Applicable to: [**CoClass**](/tB/Core/CoClass)
70+
Applicable to: [**CoClass**](CoClass)
7171

7272
In addition to interfaces, twinBASIC also allows defining coclasses -- creatable classes that implement one or more defined interfaces. Like interfaces, these too must be in .twin files and not legacy .bas/.cls files, and must appear prior to the `Class` or `Module` statement. The generic form is:
7373

@@ -81,51 +81,51 @@ CoClass <name>
8181
End CoClass
8282
```
8383

84-
The methods are [procedures](/tB/Gloss/#procedure).
84+
The methods are [procedures](../Gloss#procedure).
8585

86-
For an overview of coclasses in tB, see [Defining coclasses](/Features/Overview#defining-coclasses).
86+
For an overview of coclasses in tB, see [Defining coclasses](../../Features/Overview#defining-coclasses).
8787

8888
## ComCreatable(Bool)
8989

9090
{: #comcreatable }
9191

9292
Syntax: **[ComCreatable(True** \| **False)]**
9393

94-
Applicable to: [**CoClass**](/tB/Core/CoClass)
94+
Applicable to: [**CoClass**](CoClass)
9595

96-
Indicates that this coclass can be created with the [**New**](/tB/Core/New) keyword. This attribute is is **True** by default.
96+
Indicates that this coclass can be created with the [**New**](New) keyword. This attribute is is **True** by default.
9797

9898
## ComExtensible(Bool)
9999

100100
{: #comextensible }
101101

102102
Syntax: **[ComExtensible(True** \| **False)]**
103103

104-
Applicable to: [**Interface**](/tB/Core/Interface), [procedure in an Interface](/tB/Gloss/#procedure)
104+
Applicable to: [**Interface**](Interface), [procedure in an Interface](../Gloss#procedure)
105105

106106
Specifies whether new members added at runtime can be called by name through an interface implementing **IDispatch**. This attribute is set to **False** by default.
107107

108108
## ComImport
109109

110110
Syntax: **[ComImport]**
111111

112-
Applicable to: [**Interface**](/tB/Core/Interface)
112+
Applicable to: [**Interface**](Interface)
113113

114114
Specifies that an interface is an import from an external COM library, for instance, the Windows shell.
115115

116116
## CompileIf(Bool)
117117

118118
Syntax: **[CompileIf(** condition **)]**
119119

120-
Applicable to: [procedure definitions](/tB/Gloss/#procedure)
120+
Applicable to: [procedure definitions](../Gloss#procedure)
121121

122122
Controls the conditional compilation of a procedure definition. Has no default value.
123123

124124
## ConstantFoldable
125125

126126
Syntax: **[ConstantFoldable]**
127127

128-
Applicable to: [**Function**](/tB/Core/Function)
128+
Applicable to: [**Function**](Function)
129129

130130
Specify this attribute for functions where when called with non-variable input, will be computed at compile time, rather than runtime. For example, a function to converted string literals to ANSI. The result would never change, so the resulting ANSI string is stored, rather than recomputing every run. Such functions are also called *pure functions*, because their output only depends on the arguments, and not on the state of the program.
131131

@@ -135,15 +135,15 @@ Specify this attribute for functions where when called with non-variable input,
135135

136136
Syntax: **[Debuggable(True** \| **False)]**
137137

138-
Applicable to: [**Module**](/tB/Core/Module), [procedure in a Class or Module](/tB/Gloss/#procedure)
138+
Applicable to: [**Module**](Module), [procedure in a Class or Module](../Gloss#procedure)
139139

140140
When false, turns of breakpoints and stepping for the method or module. The default value is **True**.
141141

142142
## DebugOnly
143143

144144
Syntax: **[DebugOnly]**
145145

146-
Applicable to: [procedure definitions](/tB/Gloss/#procedure)
146+
Applicable to: [procedure definitions](../Gloss#procedure)
147147

148148
Excludes calls to this procedure from the Build. They are only available when running from the IDE, i.e. debugging.
149149

@@ -152,7 +152,7 @@ Excludes calls to this procedure from the Build. They are only available when ru
152152

153153
Syntax: **[Description("** arbitrary text **")]**
154154

155-
Applicable to: [**Class**](/tB/Core/Class), [**CoClass**](/tB/Core/CoClass), [**Const**](/tB/Core/Const), [**Declare** (API declaration)](/tB/Core/Declare), [**Interface**](/tB/Core/Interface), [**Module**](/tB/Core/Module), [**Type** (UDT)](/tB/Core/Type)
155+
Applicable to: [**Class**](Class), [**CoClass**](CoClass), [**Const**](Const), [**Declare** (API declaration)](Declare), [**Interface**](Interface), [**Module**](Module), [**Type** (UDT)](Type)
156156

157157
Provides a description in information popups in the IDE, and is exported as a `helpstring` attribute in the type library (if applicable).
158158

@@ -162,15 +162,15 @@ Provides a description in information popups in the IDE, and is exported as a `h
162162

163163
Syntax: **[DispId(** 123 **)]**
164164

165-
Applicable to: [procedure in an Interface](/tB/Gloss/#procedure)
165+
Applicable to: [procedure in an Interface](../Gloss#procedure)
166166

167167
Defines a dispatch ID associated with the procedure.
168168

169169
## DllExport
170170

171171
Syntax: **[DllExport]**
172172

173-
Applicable to: [procedures](/tB/Gloss/#procedure) and variables in a module.
173+
Applicable to: [procedures](../Gloss#procedure) and variables in a module.
174174

175175
It's possible to export a function or variable from standard modules. Example:
176176

@@ -185,7 +185,7 @@ Public Const MyExportedSymbol As Long = &H00000001
185185

186186
Syntax: **DllStackCheck( True** \| **False)**
187187

188-
Applicable to: [**Declare** (API declaration)](/tB/Core/Declare)
188+
Applicable to: [**Declare** (API declaration)](Declare)
189189

190190
Gives minor codegen size reduction on 32-bit API calls on the Intel platform. Has no effect on other platforms.
191191

@@ -195,15 +195,15 @@ Gives minor codegen size reduction on 32-bit API calls on the Intel platform. Ha
195195

196196
Syntax: **[EnumId("** 00000000-0000-0000-0000-000000000000 **")]**
197197

198-
Applicable to: [**Enum**](/tB/Core/Enum)
198+
Applicable to: [**Enum**](Enum)
199199

200200
Specifies a GUID to be associated with an enum in type libraries.
201201

202202
## Flags
203203

204204
Syntax: **[Flags]**
205205

206-
Applicable to: [**Enum**](/tB/Core/Enum)
206+
Applicable to: [**Enum**](Enum)
207207

208208
Calculate implicit enum values as a flag set (powers of 2).
209209

@@ -218,15 +218,15 @@ Calculate implicit enum values as a flag set (powers of 2).
218218

219219
Syntax: **FloatingPointErrorChecks( True** \| **False)**
220220

221-
Applicable to: [**Class**](/tB/Core/Class), [**Module**](/tB/Core/Module), [procedure](/tB/Gloss/#procedure)
221+
Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure)
222222

223223
Disables floating point error checks. Used on performance-critical routines. The default value is **True**.
224224

225225
## Hidden
226226

227227
Syntax: **[Hidden]**
228228

229-
Applicable to: [**CoClass**](/tB/Core/CoClass), [**Interface**](/tB/Core/Interface)
229+
Applicable to: [**CoClass**](CoClass), [**Interface**](Interface)
230230

231231
Hides the interface or coclass from certain Intellisense and other lists.
232232

@@ -236,7 +236,7 @@ Hides the interface or coclass from certain Intellisense and other lists.
236236

237237
Syntax: **IntegerOverflowChecks( True** \| **False)**
238238

239-
Applicable to: [**Class**](/tB/Core/Class), [**Module**](/tB/Core/Module), [procedure](/tB/Gloss/#procedure)
239+
Applicable to: [**Class**](Class), [**Module**](Module), [procedure](../Gloss#procedure)
240240

241241
Disables integer overflow checks. Used on performance-critical routines. The default value is **True**.
242242

@@ -246,9 +246,9 @@ Disables integer overflow checks. Used on performance-critical routines. The def
246246

247247
Syntax: **[InterfaceId("**00000000-0000-0000-0000-000000000000**")]**
248248

249-
Applicable to: [**Interface**](/tB/Core/Interface)
249+
Applicable to: [**Interface**](Interface)
250250

251-
twinBASIC supports defining COM interfaces using BASIC syntax, rather than needing an type library with IDL and C++. These are only supported in .twin files, not in legacy .bas or .cls files. They must appear *before* the [**Class**](/tB/Core/Class) or [**Module**](/tB/Core/Module) statement, and will always have a project-wide scope. the The generic form for is as follows:
251+
twinBASIC supports defining COM interfaces using BASIC syntax, rather than needing an type library with IDL and C++. These are only supported in .twin files, not in legacy .bas or .cls files. They must appear *before* the [**Class**](Class) or [**Module**](Module) statement, and will always have a project-wide scope. the The generic form for is as follows:
252252

253253
``` vb
254254
[InterfaceId ("00000000-0000-0000-0000-000000000000")]
@@ -262,17 +262,17 @@ Interface <name> Extends <base-interface>
262262
End Interface
263263
```
264264

265-
The methods are [procedures](/tB/Gloss/#procedure).
265+
The methods are [procedures](../Gloss#procedure).
266266

267-
For an overview of interfaces in tB, see [Defining interfaces](/Features/Overview#defining-interfaces).
267+
For an overview of interfaces in tB, see [Defining interfaces](../../Features/Overview#defining-interfaces).
268268

269269
## OleAutomation(Bool)
270270

271271
{: #oleautomation }
272272

273273
Syntax: **[OleAutomation(True** \| **False)]**
274274

275-
Applicable to: [**Interface**](/tB/Core/Interface)
275+
Applicable to: [**Interface**](Interface)
276276

277277
Controls whether this attribute is applied in the typelibrary. This attribute is set to **True** by default.
278278

@@ -282,7 +282,7 @@ Controls whether this attribute is applied in the typelibrary. This attribute is
282282

283283
Syntax: **[PopulateFrom("json", "**internal path to .json**", "** table field **", "** name field **", "** value field **" )]**
284284

285-
Applicable to: [**Enum**](/tB/Core/Enum)
285+
Applicable to: [**Enum**](Enum)
286286

287287
Populates an **Enum** with values from a json file bundled with the project.
288288

@@ -325,7 +325,7 @@ End Enum
325325

326326
Syntax: **[PredeclaredId]**
327327

328-
Applicable to: [**Class**](/tB/Core/Class)
328+
Applicable to: [**Class**](Class)
329329

330330
When set, a global instance of the class is created when the application starts.
331331

@@ -337,7 +337,7 @@ This attribute is equivalent to the `VB_PredeclaredId` attribute in VBx .cls fil
337337

338338
Syntax: **[PreserveSig** [ **(** **True** \| **False** **)** ] **]**
339339

340-
Applicable to: Method in an [Interface](/tB/Core/Interface), [API Declarations](/tB/Core/Declare).
340+
Applicable to: Method in an [Interface](Interface), [API Declarations](Declare).
341341

342342
Default value: **False** in an Interface, **True** in an API Declare.
343343

@@ -360,7 +360,7 @@ Public Declare PtrSafe Function SHGetDesktopFolder Lib "shell32" () As IShellFol
360360

361361
Syntax: **[Restricted]**
362362

363-
Applicable to: [**Interface**](/tB/Core/Interface)
363+
Applicable to: [**Interface**](Interface)
364364

365365
Restricts the interface methods from being called in most contexts.
366366

@@ -372,7 +372,7 @@ This is attribute has the same function as the [**restricted** MIDL attribute][M
372372

373373
Syntax: **[RunAfterBuild]**
374374

375-
Applicable to: [**Function**](/tB/Core/Function), [**Sub**](/tB/Core/Sub)
375+
Applicable to: [**Function**](Function), [**Sub**](Sub)
376376

377377
Specifies a function that runs after your exe is built. Tthere's `App.LastBuildPath` to know where it is if you're e.g. signing the executable.
378378

@@ -382,7 +382,7 @@ Specifies a function that runs after your exe is built. Tthere's `App.LastBuildP
382382

383383
Syntax: **[SetDllDirectory( True** \| **False)]**
384384

385-
Applicable to: [**Declare** (API declaration)](/tB/Core/Declare), [**Module**](/tB/Core/Module)
385+
Applicable to: [**Declare** (API declaration)](Declare), [**Module**](Module)
386386

387387
Allows an explicitly loaded DLL to load its own dependencies from it's load path. Also has the effect of allowing searching the app path for the DLLs in the base app's declare statements. It can be used per-declare or within a module.
388388

@@ -392,15 +392,15 @@ Allows an explicitly loaded DLL to load its own dependencies from it's load path
392392

393393
Syntax: **[TypeHint(** an enum type **)]**
394394

395-
Applicable to: [procedure](/tB/Gloss/#procedure) parameters
395+
Applicable to: [procedure](../Gloss#procedure) parameters
396396

397397
Allows populating Intellisense with an enum for types other than **Long**.
398398

399399
## Unimplemented
400400

401401
Syntax: **[Unimplemented]**
402402

403-
Applicable to: [procedure](/tB/Gloss/#procedure) definitions
403+
Applicable to: [procedure](../Gloss#procedure) definitions
404404

405405
Makes the compiler issue a warning about the procedure being unimplemented wherever it's called. You can upgrade it to an error too.
406406

0 commit comments

Comments
 (0)