diff --git a/.drone.yml b/.drone.yml index 5470c3b..39318ac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -97,45 +97,54 @@ steps: - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key - mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy -#--- -#kind: pipeline -#type: docker -#name: create-docs-site -# -#trigger: -# branch: -# - docs -# - master -# -#steps: -# - name: build site -# image: upagge/mkdocs-material -# environment: -# SSH_DEPLOY_KEY: -# from_secret: SSH_DEPLOY_KEY -# SSH_DEPLOY_HOST: -# from_secret: SSH_DEPLOY_HOST -# SSH_DEPLOY_PORT: -# from_secret: SSH_DEPLOY_PORT -# SSH_DEPLOY_PATH: -# from_secret: SSH_DEPLOY_PATH -# SSH_DEPLOY_USER: -# from_secret: SSH_DEPLOY_USER -# commands: -# - eval $(ssh-agent -s) -# - mkdir -p ~/.ssh -# - echo "$SSH_DEPLOY_KEY" >> ~/.ssh/id_rsa -# - chmod 700 ~/.ssh -# - chmod 600 ~/.ssh/id_rsa -# - ssh-keyscan -p $SSH_DEPLOY_PORT $SSH_DEPLOY_HOST >> ~/.ssh/known_hosts -# - chmod 644 ~/.ssh/known_hosts -# - cd documentation -# - mkdocs build -# - mv site godfather-telegram -# - scp -r -P $SSH_DEPLOY_PORT ./godfather-telegram $SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:$SSH_DEPLOY_PATH +--- +kind: pipeline +type: docker +name: create-develop-docs-site +trigger: + branch: + - develop + - docs + +clone: + disable: true + +steps: + + - name: build docs + image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest + volumes: + - name: mkdocs_cache + path: ${DRONE_WORKSPACE}/documentation/ru/.cache + environment: + GIT_SSH: + from_secret: GIT_SSH + GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_rsa -p 222" + commands: + - eval $(ssh-agent -s) + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo "$GIT_SSH" >> ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - git config --global user.name "${DRONE_COMMIT_AUTHOR_NAME}" + - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}" + - git clone ssh://git@git.struchkov.dev:222/Telegram-Bots/gitlab-notification.git . + - git checkout $DRONE_COMMIT + - cd documentation/ru + - mike deploy --prefix gitlab-notification/ru --branch docs-deploy --push --update-aliases develop + +image_pull_secrets: + - DOCKER_AUTH + +volumes: + - name: mkdocs_cache + host: + path: /drone/volume/mkdocs_cache/gitlab_notification/ru --- kind: signature -hmac: bdeec02d3273fc1640c972d68cc52bffa2319ea53470d0c273f42125a1dec127 +hmac: 07fb69338d4ebdd3bc98cbef5bcd99e5be057f783e6c92844f3fe556d411267b ... diff --git a/documentation/docs/architecture/concept.md b/documentation/ru/docs/architecture/concept.md similarity index 100% rename from documentation/docs/architecture/concept.md rename to documentation/ru/docs/architecture/concept.md diff --git a/documentation/docs/assets/favicon.ico b/documentation/ru/docs/assets/favicon.ico similarity index 100% rename from documentation/docs/assets/favicon.ico rename to documentation/ru/docs/assets/favicon.ico diff --git a/documentation/docs/blog/index.md b/documentation/ru/docs/blog/index.md similarity index 100% rename from documentation/docs/blog/index.md rename to documentation/ru/docs/blog/index.md diff --git a/documentation/docs/getting-started/configuration.md b/documentation/ru/docs/getting-started/configuration.md similarity index 100% rename from documentation/docs/getting-started/configuration.md rename to documentation/ru/docs/getting-started/configuration.md diff --git a/documentation/docs/getting-started/index.md b/documentation/ru/docs/getting-started/index.md similarity index 100% rename from documentation/docs/getting-started/index.md rename to documentation/ru/docs/getting-started/index.md diff --git a/documentation/docs/getting-started/installing-dependencies.md b/documentation/ru/docs/getting-started/installing-dependencies.md similarity index 100% rename from documentation/docs/getting-started/installing-dependencies.md rename to documentation/ru/docs/getting-started/installing-dependencies.md diff --git a/documentation/docs/guides/index.md b/documentation/ru/docs/guides/index.md similarity index 100% rename from documentation/docs/guides/index.md rename to documentation/ru/docs/guides/index.md diff --git a/documentation/docs/index.md b/documentation/ru/docs/index.md similarity index 100% rename from documentation/docs/index.md rename to documentation/ru/docs/index.md diff --git a/documentation/ru/docs/stylesheets/extra.css b/documentation/ru/docs/stylesheets/extra.css new file mode 100644 index 0000000..841f6aa --- /dev/null +++ b/documentation/ru/docs/stylesheets/extra.css @@ -0,0 +1,77 @@ +.md-typeset .admonition, .md-typeset details { + font-size: 0.75rem; +} + +.md-typeset h1, .md-typeset h2 { + font-weight: 500; +} + +.md-typeset h2 { + margin-top: 4rem; +} + +.md-typeset h3 { + margin-top: 2.2rem; +} + +.md-typeset mark { + background-color: #fff3bc; + margin: -4px -4px -6px; + padding: 4px 4px 6px; +} + +@keyframes heart { + 0%, 40%, 80%, 100% { + transform: scale(1); + } + 20%, 60% { + transform: scale(1.15); + } +} +.heart { + animation: heart 1000ms infinite; +} + +@keyframes ninja-disappear { + 0% { + opacity: 1; + } + 50% { + opacity: 0.3; + } + 100% { + opacity: 1; + } +} + +.ninja-disappear { + animation: ninja-disappear 3000ms infinite; + animation-delay: 1500ms; +} + +@keyframes jingle-bell-swing { + 0% { + transform: rotate(0deg); + } + 50% { + transform: rotate(10deg); + } + 100% { + transform: rotate(0deg); + } +} + +.jingle-bell { + animation: jingle-bell-swing 2s ease-in-out infinite; + transform-origin: center; +} + + +@media(min-width: 768px) { + .frontpage-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + column-gap: 2em; + row-gap: 1em; + } +} \ No newline at end of file diff --git a/documentation/mkdocs.yml b/documentation/ru/mkdocs.yml similarity index 58% rename from documentation/mkdocs.yml rename to documentation/ru/mkdocs.yml index 1e6b27d..ec2dcbf 100644 --- a/documentation/mkdocs.yml +++ b/documentation/ru/mkdocs.yml @@ -1,5 +1,5 @@ site_name: GodFather Telegram -site_url: https://docs.struchkov.dev/godfather-telegram/ +site_url: https://docs.struchkov.dev/godfather-telegram/ru repo_url: https://github.com/Godfather-Bots/telegram-bot repo_name: Godfather-Bots/telegram-bot @@ -26,62 +26,92 @@ theme: logo: simple/telegram repo: fontawesome/brands/github palette: - - scheme: default + - media: "(prefers-color-scheme)" + primary: light blue + accent: indigo + scheme: default + toggle: + icon: material/brightness-auto + name: Switch to light mode + - media: "(prefers-color-scheme: light)" primary: light blue accent: indigo toggle: icon: material/brightness-7 name: Switch to dark mode - - scheme: slate + - media: "(prefers-color-scheme: dark)" + scheme: slate toggle: icon: material/brightness-4 - name: Switch to light mode + name: Switch to system preference features: - navigation.instant - navigation.indexes - navigation.sections - navigation.tracking - - navigation.tabs - - navigation.tabs.sticky - navigation.footer + - navigation.prune - search - search.suggest - search.highlight - content.action.edit - content.code.copy + - content.code.annotate + - content.tooltips - toc.follow - plugins: - - social - - meta - - tags - - search: - lang: ru - - git-revision-date-localized: - enable_creation_date: true + - toc.integrate +plugins: + - social + - typeset + # - blog: + # blog_toc: true + # post_date_format: short + # post_url_format: "{slug}" + # archive_toc: true + # categories: false + # authors: false + # - optimize: + # optimize_jpg_quality: 90 + - tags + - search: + lang: ru markdown_extensions: - - toc: - permalink: true - toc_depth: 3 - title: Содержание + - pymdownx.details + - pymdownx.superfences + - pymdownx.inlinehilite + - pymdownx.snippets: + auto_append: + - includes/abbreviations.md + - pymdownx.critic + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde + - attr_list + - def_list + - pymdownx.tasklist: + custom_checkbox: true - pymdownx.highlight: anchor_linenums: true - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - - pymdownx.snippets - - pymdownx.inlinehilite - - pymdownx.details - - pymdownx.smartsymbols - - pymdownx.betterem + line_spans: __span + pygments_lang_class: true - pymdownx.tabbed: alternate_style: true - pymdownx.emoji: emoji_index: !!python/name:materialx.emoji.twemoji emoji_generator: !!python/name:materialx.emoji.to_svg + - admonition + - abbr + - md_in_html + - footnotes + - toc: + toc_depth: 3 + title: Содержание + permalink: ⚓︎ +extra_css: + - stylesheets/extra.css extra: generator: false analytics: diff --git a/documentation/overrides/partials/comments.html b/documentation/ru/overrides/partials/comments.html similarity index 100% rename from documentation/overrides/partials/comments.html rename to documentation/ru/overrides/partials/comments.html diff --git a/documentation/overrides/partials/integrations/analytics/custom.html b/documentation/ru/overrides/partials/integrations/analytics/custom.html similarity index 100% rename from documentation/overrides/partials/integrations/analytics/custom.html rename to documentation/ru/overrides/partials/integrations/analytics/custom.html