Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site reorganization #185

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions client/cmd/trdl/command/md_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ func genCliPages(cmd *cobra.Command, pagesDir string) error {
fullCommandName := fullCommandFilesystemPath(cmd.CommandPath())
cmdPage := fmt.Sprintf(`---
title: %s
permalink: reference/cli/%s.html
permalink: documentation/reference/cli/%s.html
---

{%% include /reference/cli/%s.md %%}
{%% include documentation/reference/cli/%s.md %%}
`, cmd.CommandPath(), fullCommandName, fullCommandName)

path := filepath.Join(pagesDir, fmt.Sprintf("%s.md", fullCommandName))
Expand Down Expand Up @@ -145,7 +145,7 @@ func GenCliSidebar(cmdGroups Groups, sidebarPath string) error {
cli: &cli

- title: Overview
url: /reference/cli/overview.html
url: /documentation/reference/cli/overview.html
`)

for _, group := range cmdGroups {
Expand Down Expand Up @@ -185,7 +185,7 @@ func genCliSidebar(cmd *cobra.Command, indent int, buf *bytes.Buffer) error {

commandRecord := fmt.Sprintf(`
%[1]s- title: %[2]s
%[1]s url: /reference/cli/%[3]s.html
%[1]s url: /documentation/reference/cli/%[3]s.html
`, strings.Repeat(" ", indent), cmd.CommandPath(), fullCommandName)

_, err := buf.WriteString(commandRecord)
Expand Down Expand Up @@ -221,7 +221,7 @@ func genCliSidebar(cmd *cobra.Command, indent int, buf *bytes.Buffer) error {
func GenCliOverview(cmdGroups Groups, pagesDir string) error {
indexPage := `---
title: Overview
permalink: reference/cli/overview.html
permalink: documentation/reference/cli/overview.html
toc: false
---

Expand All @@ -247,7 +247,7 @@ toc: false
fullCommandName = fullCommandFilesystemPath(cmd.Commands()[0].CommandPath())
}

indexPage += fmt.Sprintf(" - [trdl %s]({{ \"/reference/cli/%s.html\" | true_relative_url }}) — {%% include /reference/cli/%s.short.md %%}.\n", cmd.Name(), fullCommandName, fullCommandName)
indexPage += fmt.Sprintf(" - [trdl %s]({{ \"/documentation/reference/cli/%s.html\" | true_relative_url }}) — {%% include /documentation/reference/cli/%s.short.md %%}.\n", cmd.Name(), fullCommandName, fullCommandName)
}

doNewline = true
Expand Down
4 changes: 2 additions & 2 deletions client/cmd/trdl/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func docsCmd(commandGroups *command.Groups) *cobra.Command {

jekyllSiteDir := args[0]

partialsDir := filepath.Join(jekyllSiteDir, "_includes/reference/cli")
pagesDir := filepath.Join(jekyllSiteDir, "pages_en/reference/cli")
partialsDir := filepath.Join(jekyllSiteDir, "_includes/documentation/reference/cli")
pagesDir := filepath.Join(jekyllSiteDir, "pages_en/documentation/reference/cli")
sidebarPath := filepath.Join(jekyllSiteDir, "_data/sidebars/_cli.yml")

for _, path := range []string{partialsDir, pagesDir} {
Expand Down
26 changes: 13 additions & 13 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ _regen_reference_cli:

_regen_reference_vault_plugin:
@cd ../server && go install github.com/werf/trdl/server/cmd/vault-plugin-docs
@vault-plugin-docs generate-jekyll --base-pages-url /reference/vault_plugin --includes-dir _includes/reference/vault_plugin --pages-dir pages_en/reference/vault_plugin --sidebar-yml-path _data/sidebars/_vault_plugin.yml
@vault-plugin-docs generate-jekyll --base-pages-url /documentation/reference/vault_plugin --includes-dir _includes/documentation/reference/vault_plugin --pages-dir pages_en/documentation/reference/vault_plugin --sidebar-yml-path _data/sidebars/_vault_plugin.yml

_compile:
@( \
reference_sidebar_path="./_data/sidebars/reference.yml" ; \
documentation_sidebar_path="./_data/sidebars/documentation.yml" ; \
cli_partial_path="./_data/sidebars/_cli.yml" ; \
vault_plugin_partial_path="./_data/sidebars/_vault_plugin.yml" ; \
reference_partial_path="./_data/sidebars/_reference.yml" ; \
echo "# This file is generated by the docs/Makefile" > $$reference_sidebar_path ; \
echo "# DO NOT EDIT!" >> $$reference_sidebar_path ; \
echo "" >> $$reference_sidebar_path ; \
echo "# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting." >> $$reference_sidebar_path ; \
echo "" >> $$reference_sidebar_path ; \
cat "$$cli_partial_path" >> "$$reference_sidebar_path" ; \
echo "" >> "$$reference_sidebar_path" ; \
cat "$$vault_plugin_partial_path" >> "$$reference_sidebar_path" ; \
echo "" >> "$$reference_sidebar_path" ; \
cat "$$reference_partial_path" >> "$$reference_sidebar_path" ; \
documentation_partial_path="./_data/sidebars/_documentation.yml" ; \
echo "# This file is generated by the docs/Makefile" > $$documentation_sidebar_path ; \
echo "# DO NOT EDIT!" >> $$documentation_sidebar_path ; \
echo "" >> $$documentation_sidebar_path ; \
echo "# This is your sidebar TOC. The sidebar code loops through sections here and provides the appropriate formatting." >> $$documentation_sidebar_path ; \
echo "" >> $$documentation_sidebar_path ; \
cat "$$cli_partial_path" >> "$$documentation_sidebar_path" ; \
echo "" >> "$$documentation_sidebar_path" ; \
cat "$$vault_plugin_partial_path" >> "$$documentation_sidebar_path" ; \
echo "" >> "$$documentation_sidebar_path" ; \
cat "$$documentation_partial_path" >> "$$documentation_sidebar_path" ; \
)

.PHONY: all regen_reference _regen_reference_cli _regen_reference_vault_plugin _compile
10 changes: 5 additions & 5 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ defaults:
sitemap_include: true
multilang: true
- scope:
path: "pages_*/reference"
path: "pages_*/documentation"
type: "pages"
values:
sidebar: reference
sidebar: documentation
- scope:
path: "pages_*/reference/cli"
path: "pages_*/documentation/reference/cli"
type: "pages"
values:
toc: false
- scope:
path: "pages_*/reference/vault_plugin/*"
path: "pages_*/documentation/reference/vault_plugin/*"
type: "pages"
values:
toc: true
- scope:
path: "pages_*/reference/vault_plugin/index.md"
path: "pages_*/documentation/reference/vault_plugin/index.md"
type: "pages"
values:
toc: false
Expand Down
54 changes: 30 additions & 24 deletions docs/_data/breadcrumbs.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
en:
/reference: &reference
/documentation: &documentation
title: Documentation
url: /documentation/reference/cli/overview.html
/documentation/reference: &reference
title: Reference
url: /reference/cli/overview.html
/reference/cli: &reference-cli
url: /documentation/reference/cli/overview.html
/documentation/reference/cli: &reference-cli
title: Command line interface
url: /reference/cli/overview.html
/reference/vault_plugin: &reference-vault_plugin
url: /documentation/reference/cli/overview.html
/documentation/reference/vault_plugin: &reference-vault_plugin
title: Vault plugin
url: /reference/vault_plugin/index.html
/reference/vault_plugin/configure: &reference-vault_plugin_configure
url: /documentation/reference/vault_plugin/index.html
/documentation/reference/vault_plugin/configure: &reference-vault_plugin_configure
title: Configure
url: /reference/vault_plugin/configure.html
/reference/vault_plugin/configure/trusted_pgp_public_key: &reference-vault_plugin_configure_trusted_pgp_public_key
url: /documentation/reference/vault_plugin/configure.html
/documentation/reference/vault_plugin/configure/trusted_pgp_public_key: &reference-vault_plugin_configure_trusted_pgp_public_key
title: Trusted PGP public key
url: /reference/vault_plugin/configure.html
/reference/vault_plugin/task: &reference-vault_plugin_task
url: /documentation/reference/vault_plugin/configure.html
/documentation/reference/vault_plugin/task: &reference-vault_plugin_task
title: Task
url: /reference/vault_plugin/task.html
/reference/vault_plugin/task/uuid: &reference-vault_plugin_task_uuid
url: /documentation/reference/vault_plugin/task.html
/documentation/reference/vault_plugin/task/uuid: &reference-vault_plugin_task_uuid
title: UUID
url: /reference/vault_plugin/task/uuid.html
/reference/vault_plugin/trusted_pgp_public_key: &reference-vault_plugin_trusted_pgp_public_key
url: /documentation/reference/vault_plugin/task/uuid.html
/documentation/reference/vault_plugin/trusted_pgp_public_key: &reference-vault_plugin_trusted_pgp_public_key
title: Trusted PGP public key
url: /reference/vault_plugin/configure/trusted_pgp_public_key/name.html
url: /documentation/reference/vault_plugin/configure/trusted_pgp_public_key/name.html
ru:
/reference:
/documentation:
<<: *documentation
title: Документация
/documentation/reference:
<< : *reference
title: Справочник
/reference/cli:
/documentation/reference/cli:
<< : *reference-cli
title: CLI
/reference/vault_plugin:
/documentation/reference/vault_plugin:
<< : *reference-vault_plugin
/reference/vault_plugin/configure:
/documentation/reference/vault_plugin/configure:
<<: *reference-vault_plugin_configure
/reference/vault_plugin/configure/trusted_pgp_public_key:
/documentation/reference/vault_plugin/configure/trusted_pgp_public_key:
<<: *reference-vault_plugin_configure_trusted_pgp_public_key
/reference/vault_plugin/task:
/documentation/reference/vault_plugin/task:
<<: *reference-vault_plugin_task
/reference/vault_plugin/task/uuid:
/documentation/reference/vault_plugin/task/uuid:
<<: *reference-vault_plugin_task_uuid
/reference/vault_plugin/trusted_pgp_public_key:
/documentation/reference/vault_plugin/trusted_pgp_public_key:
<<: *reference-vault_plugin_trusted_pgp_public_key
20 changes: 10 additions & 10 deletions docs/_data/sidebars/_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@
cli: &cli

- title: Overview
url: /reference/cli/overview.html
url: /documentation/reference/cli/overview.html

- title: Configuration commands
f:

- title: trdl add
url: /reference/cli/trdl_add.html
url: /documentation/reference/cli/trdl_add.html

- title: trdl remove
url: /reference/cli/trdl_remove.html
url: /documentation/reference/cli/trdl_remove.html

- title: trdl list
url: /reference/cli/trdl_list.html
url: /documentation/reference/cli/trdl_list.html

- title: trdl set-default-channel
url: /reference/cli/trdl_set_default_channel.html
url: /documentation/reference/cli/trdl_set_default_channel.html

- title: Main commands
f:

- title: trdl use
url: /reference/cli/trdl_use.html
url: /documentation/reference/cli/trdl_use.html

- title: Advanced commands
f:

- title: trdl update
url: /reference/cli/trdl_update.html
url: /documentation/reference/cli/trdl_update.html

- title: trdl exec
url: /reference/cli/trdl_exec.html
url: /documentation/reference/cli/trdl_exec.html

- title: trdl dir-path
url: /reference/cli/trdl_dir_path.html
url: /documentation/reference/cli/trdl_dir_path.html

- title: trdl bin-path
url: /reference/cli/trdl_bin_path.html
url: /documentation/reference/cli/trdl_bin_path.html
64 changes: 64 additions & 0 deletions docs/_data/sidebars/_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
entries:
en:
f:

- &how_it_works
title: How it works
url: /documentation/how_it_works.html

- &quickstart
title: Quickstart
url: /documentation/quickstart.html

- &security
title: Security
url: /documentation/security.html

- title: Reference
f:

- title: Command line interface
f: *cli

- title: Vault plugin
f: *_vault_plugin

- &trdl_yaml
title: trdl.yaml
url: /documentation/reference/trdl_yaml.html

- &trdl_channels_yaml
title: trdl_channels.yaml
url: /documentation/reference/trdl_channels_yaml.html

- &tuf_repository_layout
title: TUF repository layout
url: /documentation/reference/tuf_repository_layout.html

ru:
f:

- <<: *how_it_works
title: Как это работает

- <<: *quickstart
title: Быстрый старт

- <<: *security
title: "Безопасность"

- title: Reference
f:

- title: CLI
f: *cli

- title: Плагин vault
f: *_vault_plugin

- *trdl_yaml

- *trdl_channels_yaml

- <<: *tuf_repository_layout
title: "Организация TUF-репозитория"
35 changes: 0 additions & 35 deletions docs/_data/sidebars/_reference.yml

This file was deleted.

26 changes: 13 additions & 13 deletions docs/_data/sidebars/_vault_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@

_vault_plugin: &_vault_plugin
- title: Overview
url: /reference/vault_plugin/index.html
url: /documentation/reference/vault_plugin/index.html
- title: Paths
f:
- title: /configure
url: /reference/vault_plugin/configure.html
url: /documentation/reference/vault_plugin/configure.html
- title: /configure/git_credential
url: /reference/vault_plugin/configure/git_credential.html
url: /documentation/reference/vault_plugin/configure/git_credential.html
- title: /configure/pgp_signing_key
url: /reference/vault_plugin/configure/pgp_signing_key.html
url: /documentation/reference/vault_plugin/configure/pgp_signing_key.html
- title: /configure/trusted_pgp_public_key
url: /reference/vault_plugin/configure/trusted_pgp_public_key.html
url: /documentation/reference/vault_plugin/configure/trusted_pgp_public_key.html
- title: /configure/trusted_pgp_public_key/:name
url: /reference/vault_plugin/configure/trusted_pgp_public_key/name.html
url: /documentation/reference/vault_plugin/configure/trusted_pgp_public_key/name.html
- title: /publish
url: /reference/vault_plugin/publish.html
url: /documentation/reference/vault_plugin/publish.html
- title: /release
url: /reference/vault_plugin/release.html
url: /documentation/reference/vault_plugin/release.html
- title: /task
url: /reference/vault_plugin/task.html
url: /documentation/reference/vault_plugin/task.html
- title: /task/configure
url: /reference/vault_plugin/task/configure.html
url: /documentation/reference/vault_plugin/task/configure.html
- title: /task/:uuid
url: /reference/vault_plugin/task/uuid.html
url: /documentation/reference/vault_plugin/task/uuid.html
- title: /task/:uuid/cancel
url: /reference/vault_plugin/task/uuid/cancel.html
url: /documentation/reference/vault_plugin/task/uuid/cancel.html
- title: /task/:uuid/log
url: /reference/vault_plugin/task/uuid/log.html
url: /documentation/reference/vault_plugin/task/uuid/log.html
Loading