Skip to content

Commit 466caea

Browse files
committed
improve documentation
1 parent d25937a commit 466caea

File tree

12 files changed

+38
-7
lines changed

12 files changed

+38
-7
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build-deploy:
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
1313

doc/Doxyfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Inja"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 2.0.0
41+
PROJECT_NUMBER = 2.1.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -51,7 +51,7 @@ PROJECT_BRIEF = "A Template Engine for Modern C++"
5151
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
5252
# the logo to the output directory.
5353

54-
PROJECT_LOGO = "./logo.jpg"
54+
PROJECT_LOGO = "./logo-doxygen.jpg"
5555

5656
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
5757
# into which the generated documentation will be written. If a relative path is
@@ -792,7 +792,8 @@ WARN_LOGFILE =
792792
# Note: If this tag is empty the current directory is searched.
793793

794794
INPUT = ../include/inja \
795-
../README.md
795+
../README.md \
796+
support.md
796797

797798
# This tag can be used to specify the character encoding of the source files
798799
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -908,7 +909,7 @@ EXCLUDE_SYMBOLS = stdinja
908909
# that contain example code fragments that are included (see the \include
909910
# command).
910911

911-
EXAMPLE_PATH =
912+
EXAMPLE_PATH = ./examples
912913

913914
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
914915
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -922,7 +923,7 @@ EXAMPLE_PATTERNS = *
922923
# irrespective of the value of the RECURSIVE tag.
923924
# The default value is: NO.
924925

925-
EXAMPLE_RECURSIVE = NO
926+
EXAMPLE_RECURSIVE = YES
926927

927928
# The IMAGE_PATH tag can be used to specify one or more files or directories
928929
# that contain images that are to be included in the documentation (see the
@@ -1657,7 +1658,7 @@ EXTRA_SEARCH_MAPPINGS =
16571658
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
16581659
# The default value is: YES.
16591660

1660-
GENERATE_LATEX = YES
1661+
GENERATE_LATEX = NO
16611662

16621663
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
16631664
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

doc/logo-doxygen.jpg

11.7 KB
Loading

doc/support.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@page support_page Support
2+
3+
If you have questions or issues regarding the use of doxygen, please use the Github [Issue Tracker](https://github.com/pantor/inja/issues). You can always contribute by helping with programming, testing and filing bug reports, and improving documentation!

include/inja/config.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ enum class ElementNotation {
1414
Pointer
1515
};
1616

17+
/*!
18+
* \brief Class for lexer configuration.
19+
*/
1720
struct LexerConfig {
1821
std::string statement_open {"{%"};
1922
std::string statement_close {"%}"};
@@ -44,6 +47,9 @@ struct LexerConfig {
4447
}
4548
};
4649

50+
/*!
51+
* \brief Class for parser configuration.
52+
*/
4753
struct ParserConfig {
4854
ElementNotation notation {ElementNotation::Dot};
4955
};

include/inja/environment.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ namespace inja {
2222

2323
using namespace nlohmann;
2424

25+
/*!
26+
* \brief Class for changing the configuration.
27+
*/
2528
class Environment {
2629
class Impl {
2730
public:

include/inja/function_storage.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ using namespace nlohmann;
1212
using Arguments = std::vector<const json*>;
1313
using CallbackFunction = std::function<json(Arguments& args)>;
1414

15+
/*!
16+
* \brief Class for builtin functions and user-defined callbacks.
17+
*/
1518
class FunctionStorage {
1619
public:
1720
void add_builtin(nonstd::string_view name, unsigned int num_args, Bytecode::Op op) {

include/inja/lexer.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace inja {
1313

14+
/*!
15+
* \brief Class for lexing an inja Template.
16+
*/
1417
class Lexer {
1518
enum class State {
1619
Text,

include/inja/parser.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class ParserStatic {
5858
FunctionStorage functions;
5959
};
6060

61+
/*!
62+
* \brief Class for parsing an inja Template.
63+
*/
6164
class Parser {
6265
public:
6366
explicit Parser(const ParserConfig& parser_config, const LexerConfig& lexer_config, TemplateStorage& included_templates): m_config(parser_config), m_lexer(lexer_config), m_included_templates(included_templates), m_static(ParserStatic::get_instance()) { }

include/inja/renderer.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ inline nonstd::string_view convert_dot_to_json_pointer(nonstd::string_view dot,
2424
return nonstd::string_view(out.data(), out.size());
2525
}
2626

27+
/*!
28+
* \brief Class for rendering a Template with data.
29+
*/
2730
class Renderer {
2831
std::vector<const json*>& get_args(const Bytecode& bc) {
2932
m_tmp_args.clear();

0 commit comments

Comments
 (0)