Documentation
¶
Overview ¶
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Ema.Tools - Publishing Reworked Copyright (C) 2026 Team Quadrimus
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- func Build(ctx context.Context, config *Config) error
- func Clear(text any) any
- func ClearLeft(text any) any
- func ClearRight(text any) any
- func Indent(tabs int, text any) any
- func Lower(text any) any
- func Replace(text any, old, new string) any
- func Sequence(first, last int64) any
- func TemplateFuncs(source TemplateSource) map[string]any
- func Text(text string) any
- func Upper(text any) any
- func Year() any
- type Config
- type L10n
- type Language
- type Page
- type PageData
- type PageOptions
- type Template
- func (t *Template) Error(err error)
- func (t *Template) Execute(w io.Writer, page *Page) error
- func (t *Template) L10n(name string) string
- func (t *Template) Link(name, language string) string
- func (t *Template) Page(name string) (*Page, error)
- func (t *Template) Render(w io.Writer, name string) error
- type TemplateSource
- type Web
- type WebData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearRight ¶
func TemplateFuncs ¶
func TemplateFuncs(source TemplateSource) map[string]any
Types ¶
type Config ¶
type Page ¶
type Page struct {
Name string `json:"name,omitempty"` // explicitly defined name by user
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Options *PageOptions `json:"options,omitempty"`
Values map[string]any `json:"values,omitempty"`
Path string `json:"-"` // full path including language and file extensions (never starts to slash)
Language string `json:"-"` // language extracted from path (first element) or empty string
PathName string `json:"-"` // name derived from path excluding language, index or file extension
Template *Template `json:"-"` // current page has template "content", all templates are also added
List []*Page `json:"-"` // all pages with the same language located in the same directory (only for index.html)
Web *Web `json:"-"`
}
func (*Page) NameOrPathName ¶
func (*Page) OutputPath ¶
type PageData ¶
type PageOptions ¶
type PageOptions struct {
Flat bool // preserve file path as link, do not move to subfolder as index.html
Hide bool // page will not be part of sitemap
Skip bool // skip this page during loading phase
}
func (*PageOptions) MarshalJSON ¶
func (p *PageOptions) MarshalJSON() ([]byte, error)
func (*PageOptions) UnmarshalJSON ¶
func (p *PageOptions) UnmarshalJSON(data []byte) error