Skip to content

Commit da8f279

Browse files
committed
fix(ci): use Natural Docs native binary and fix config format
- Replace dotnet tool install (not on NuGet) with direct download of Natural Docs 2.4 native Linux binary - Add required Format: header to Project.txt and Languages.txt - Create docs-output directory before generation
1 parent e1a936a commit da8f279

3 files changed

Lines changed: 319 additions & 9 deletions

File tree

.github/workflows/docs.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030

31-
- name: Setup .NET
32-
uses: actions/setup-dotnet@v4
33-
with:
34-
dotnet-version: '8.0.x'
35-
3631
- name: Install Natural Docs
37-
run: dotnet tool install --global Natural_Docs --version 2.3.1
32+
run: |
33+
curl -sL "https://www.naturaldocs.org/download/natural_docs/2.4/Natural_Docs_2.4_Development_Release_2.Linux.x64.zip" -o nd.zip
34+
unzip -q nd.zip -d naturaldocs
35+
chmod +x "naturaldocs/Natural Docs/NaturalDocs"
3836
3937
- name: Generate documentation
40-
run: NaturalDocs NaturalDocs.Project --rebuild
38+
run: |
39+
mkdir -p docs-output
40+
"naturaldocs/Natural Docs/NaturalDocs" NaturalDocs.Project --rebuild
4141
4242
- name: Upload Pages artifact
4343
uses: actions/upload-pages-artifact@v3

NaturalDocs.Project/Languages.txt

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,108 @@
1+
Format: 2.4 (Development Release 2)
2+
3+
# This is the Natural Docs languages file for this project. If you change
4+
# anything here, it will apply to THIS PROJECT ONLY. You can edit the version
5+
# in Natural Docs' Config folder to make the changes apply to all projects,
6+
# but it's recommended that you edit this version instead.
7+
8+
9+
# Ignored Extensions
10+
# ------------------------------------------------------------------------
11+
12+
# If you'd like to prevent certain file extensions from being scanned by
13+
# Natural Docs, you can do it like this:
14+
#
15+
# Ignore Extensions: [extension] [extension] ...
16+
17+
18+
# Languages
19+
# ------------------------------------------------------------------------
20+
# The syntax reference is after the definitions.
21+
122
Language: SQF
223

324
Extensions: sqf hpp
425

5-
Line Comments: //
6-
Block Comments: /* */
26+
Line Comment: //
27+
Block Comment: /* */
28+
29+
30+
# These settings define the languages Natural Docs knows how to parse. You
31+
# can define your own here or override the settings of the existing ones.
32+
# Note that all lists are space separated so that commas can be used as
33+
# values.
34+
#
35+
# Language: [name]
36+
# Alter Language: [name]
37+
# Defines a new language or alters an existing one. Its name can use any
38+
# characters. If any of the properties below have an add/replace form, you
39+
# must use that when using Alter Language.
40+
#
41+
# The language Shebang Script is special. It's entry is only used for
42+
# extensions, and files with those extensions have their shebang (#!) lines
43+
# read to determine the real language of the file. Extensionless files are
44+
# always treated this way.
45+
#
46+
# The language Text File is also special. It's treated as one big comment
47+
# so you can put Natural Docs content in them without special symbols.
48+
#
49+
# Extensions: [extension] [extension] ...
50+
# [Add/Replace] Extensions: [extension] [extension] ...
51+
# Defines the file extensions of the language's source files.
52+
#
53+
# Shebang Strings: [string] [string] ...
54+
# [Add/Replace] Shebang Strings: [string] [string] ...
55+
# Defines a list of strings that can appear in the shebang (#!) line to
56+
# designate that it's part of the language.
57+
#
58+
# Simple Identifier: [name]
59+
# The name of the language using only the letters A to Z. No spaces,
60+
# numbers, symbols, or Unicode allowed. Defaults to the language name
61+
# minus any unacceptable characters. This is used to generate things like
62+
# CSS class names.
63+
#
64+
# Aliases: [alias] [alias] ...
65+
# [Add/Replace] Aliases: [alias] [alias] ...
66+
# Defines alternative names for the language that can be used to start a
67+
# code block.
68+
#
69+
#
70+
# Properties for Basic Language Support Only
71+
# ------------------------------------------------------------------------
72+
# If you're adding your own language to Natural Docs you must define these.
73+
#
74+
# Line Comments: [symbol] [symbol] ...
75+
# Defines a space-separated list of symbols that are used for line comments,
76+
# if any.
77+
#
78+
# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
79+
# Defines a space-separated list of symbol pairs that are used for block
80+
# comments, if any.
81+
#
82+
# Member Operator: [symbol]
83+
# Defines the default member operator symbol. The default is a dot.
84+
#
85+
# Line Extender: [symbol]
86+
# Defines the symbol that allows a prototype to span multiple lines if
87+
# normally a line break would end it.
88+
#
89+
# Enum Values: [global|under type|under parent]
90+
# Defines how enum values are referenced. The default is global.
91+
# global - Values are always global, referenced as 'value'.
92+
# under type - Values are under the enum type, referenced as
93+
# 'class.enum.value'.
94+
# under parent - Values are under the enum's parent, referenced as
95+
# 'class.value'.
96+
#
97+
# Case Sensitive: [yes|no]
98+
# Defines whether the language's identifiers are case sensitive. The
99+
# default is yes.
100+
#
101+
# Block Comments Nest: [yes|no]
102+
# Defines whether the language's block comments can nest. The default is
103+
# no.
104+
#
105+
# [Comment Type] Prototype Enders: [symbol] [symbol] ...
106+
# When defined, Natural Docs will attempt to get a prototype from the code
107+
# immediately following the comment type. It stops when it reaches one of
108+
# these symbols. Use \n for line breaks.

NaturalDocs.Project/Project.txt

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,214 @@
1+
Format: 2.4 (Development Release 2)
2+
3+
# This is the main file you use to configure Natural Docs for your project.
4+
5+
6+
# Project Information
7+
# ------------------------------------------------------------------------
8+
19
Title: OCAP2
210
Subtitle: Operations Capture and Playback
311

12+
13+
# This is where you put general information about your project. None of these
14+
# settings are required, though Title is recommended.
15+
#
16+
# Title: [text]
17+
# The name of your project. (R) and (TM) will be converted to their
18+
# respective symbols.
19+
#
20+
# Subtitle: [text]
21+
# A subtitle for your project, if desired.
22+
#
23+
# Copyright: [text]
24+
# The copyright notice for your project. (C) will be converted to the
25+
# copyright symbol.
26+
#
27+
# Timestamp: [text]
28+
# Text explaining when the documentation was generated, such as "Last
29+
# Updated Month Day Year", if you want that to be included. The following
30+
# substitutions are performed:
31+
#
32+
# m - Single digit month, when possible. January is "1".
33+
# mm - Always double digit month. January is "01".
34+
# mon - Short month word. January is "Jan".
35+
# month - Long month word. January is "January".
36+
# d - Single digit day, when possible. 1 is "1".
37+
# dd - Always double digit day. 1 is "01".
38+
# day - Day with text extension. 1 is "1st".
39+
# yy - Double digit year. 2022 is "22".
40+
# yyyy - Four digit year. 2022 is "2022".
41+
# year - Four digit year. 2022 is "2022".
42+
#
43+
# Style: [style]
44+
# A custom style to apply to the generated documentation. See
45+
# https://naturaldocs.org/reference/styles for more information.
46+
#
47+
# Home Page: [file]
48+
# A custom home page for the generated documentation. It could be a
49+
# documented file in one of the source folders or a HTML file in any
50+
# location.
51+
#
52+
# Encoding: [name or code page number]
53+
# Encoding: [name or code page number] *.[extension]
54+
# The character encoding source files use if it is something other than
55+
# Unicode. It can be specified as a name such as "iso-8859-1" or a code
56+
# page number such as "28591". You can see the list of encodings your
57+
# system supports by running Natural Docs with the --list-encodings command
58+
# line option.
59+
#
60+
# Natural Docs defaults to Unicode which will handle all forms of UTF-8,
61+
# UTF-16, and UTF-32. You can set a new default for all files or you can
62+
# limit it to an extension such as "*.txt". You can use multiple Encoding
63+
# lines to cover all the extensions that need them.
64+
#
65+
# You can also set encodings for specific folders by adding Encoding lines
66+
# in Source Folder sections.
67+
68+
69+
# Source Code
70+
# ------------------------------------------------------------------------
71+
472
Source Folder: ../addons
573

74+
75+
# This is where you tell Natural Docs which folders it should scan for source
76+
# files. If you add any on the command line this section is ignored except
77+
# for the properties of the ones from the command line.
78+
#
79+
# Source Folder: [folder]
80+
# Specifies a folder which will be searched for source files. The path is
81+
# relative to the project configuration folder, which lets this file remain
82+
# portable across computers and not cause problems in version control
83+
# systems. You can enter an absolute path and it will be converted
84+
# automatically.
85+
#
86+
# Additional properties can be added after each source folder:
87+
#
88+
# Name: [name]
89+
# How this source folder will appear in the menu if you have more than
90+
# one.
91+
#
92+
# [name] Repository: [url]
93+
# The web-based repository for the source files. The URL should go to
94+
# the main project page, such as "https://github.com/User/MyProject".
95+
# You can optionally include the name of the repository site, such as
96+
# "GitHub".
97+
#
98+
# Additional repository properties can be added as needed:
99+
#
100+
# Branch: [name]
101+
# If you're using GitHub, CodeBerg, or Gitea and want the links to go
102+
# to a specific branch, add its name here. If you're using GitLab
103+
# you must always include the branch name, which could be "main" or
104+
# "master" for the trunk.
105+
#
106+
# Link Template: [url]
107+
# If you're not using GitHub, GitLab, CodeBerg, or Gitea, add the URL
108+
# used to link to source files. Include {File} to represent where
109+
# the file path goes and {LineNumber} for where the line number goes.
110+
# For example, "https://mysite.com/repo/src/{File}#L{LineNumber}".
111+
#
112+
# Encoding: [name or code page number]
113+
# Encoding: [name or code page number] *.[extension]
114+
# Encoding: [name or code page number] [folder]
115+
# Encoding: [name or code page number] [folder]\*.[extension]
116+
# The character encoding source files use if it's something other than
117+
# Unicode. It can be specified as a name such as "iso-8859-1" or a code
118+
# page number such as "28591". You can see the list of encodings your
119+
# system supports by running Natural Docs with the --list-encodings
120+
# command line option.
121+
#
122+
# Natural Docs defaults to Unicode which will handle all forms of UTF-8,
123+
# UTF-16, and UTF-32. You can set a new default for all files in this
124+
# folder, limit it to an extension such as "*.txt", limit it to a
125+
# subfolder, or limit it to extensions in a subfolder. You can use
126+
# multiple Encoding lines to cover all the subfolders and extensions
127+
# that need them.
128+
129+
130+
# Source Filtering
131+
# ------------------------------------------------------------------------
132+
133+
# If there are any subfolders in the source code that you would like Natural
134+
# Docs to ignore they can be added here. If you use any of these options on
135+
# the command line this section is ignored.
136+
#
137+
# Ignore Source Folder: [folder]
138+
# Tells Natural Docs to skip this folder when scanning files.
139+
#
140+
# Ignore Source Folder Pattern: [pattern]
141+
# Tells Natural Docs to skip all folder names which match this pattern when
142+
# scanning files. ? matches a single character, * matches zero or more
143+
# characters. It applies to the entire folder name, so "cli" will not
144+
# match "client", although "cli*" will.
145+
#
146+
# The data folders of common version control systems (.git, .svn, .cvs, .hg)
147+
# are ignored automatically. You don't have to add them here.
148+
149+
150+
# Images
151+
# ------------------------------------------------------------------------
152+
153+
# This is where you tell Natural Docs which folders it should look for images
154+
# in. When you put something like (see diagram.jpg) in a comment Natural Docs
155+
# will look for it relative to the source file it appears in plus any folders
156+
# added here. If you add any on the command line this section is ignored.
157+
#
158+
# Image Folder: [folder]
159+
# Specifies a folder which will be searched for image files. The path is
160+
# relative to the project configuration folder, which lets this file remain
161+
# portable across computers and not cause problems in version control
162+
# systems. You can enter absolute paths and they will be converted
163+
# automatically.
164+
165+
166+
167+
# Generated Documentation
168+
# ------------------------------------------------------------------------
169+
6170
HTML Output Folder: ../docs-output
171+
172+
173+
# This is where you tell Natural Docs what kind of documentation you want
174+
# built and where it should be put. If you use any of these options on the
175+
# command line this section is ignored except for the properties of the ones
176+
# from the command line.
177+
#
178+
# HTML Output Folder: [folder]
179+
# Generates HTML documentation in the specified folder. The path is
180+
# relative to the project configuration folder, which lets this file remain
181+
# portable across computers and not cause problems in version control
182+
# systems. You can enter an absolute path and it will be converted
183+
# automatically.
184+
#
185+
# Additional properties can be added after each output folder:
186+
#
187+
# Title: [text]
188+
# Subtitle: [text]
189+
# Copyright: [text]
190+
# Timestamp: [text]
191+
# Style: [style]
192+
# Home Page: [file]
193+
# These properties can be overridden for just this output folder, which
194+
# allows you to have multiple output folders with different styles or
195+
# titles. See the Project Information section for descriptions of them.
196+
197+
198+
# Global Settings
199+
# ------------------------------------------------------------------------
200+
201+
# Other settings that apply to your entire project. Settings specified on the
202+
# command line override the settings here.
203+
#
204+
# Tab Width: [width]
205+
# The number of spaces tabs should be expanded to.
206+
#
207+
# Documented Only: [yes|no]
208+
# Whether only documented code elements should appear in the output.
209+
# Defaults to no.
210+
#
211+
# Auto Group: [yes|no]
212+
# Whether groups should automatically apply to you code. Defaults to yes.
213+
214+

0 commit comments

Comments
 (0)