From 405068a787b5ff6a6b0c95779587c8750cc4d924 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Thu, 2 Nov 2023 16:13:10 +0200 Subject: [PATCH] added srl version macros and simplified yum install --- docs/blog/posts/2023/srlgpt.md | 11 ++++---- docs/stylesheets/nokia.css | 47 +++++++++++++++++++++++++++++++++- macros/macros.html | 9 +++++++ mkdocs.yml | 3 ++- 4 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 macros/macros.html diff --git a/docs/blog/posts/2023/srlgpt.md b/docs/blog/posts/2023/srlgpt.md index 5e64583f..0118b8e9 100644 --- a/docs/blog/posts/2023/srlgpt.md +++ b/docs/blog/posts/2023/srlgpt.md @@ -10,6 +10,9 @@ authors: # SR Linux GPT +[[[% import 'macros.html' as macros %]]] +[[[ macros.srl_version('23.7.1') ]]] + It's taken much longer than we anticipated and wanted (Big co problems...) but we're finally here, SR Linux GPT release day! ![feat](https://gitlab.com/rdodin/pics/-/wikis/uploads/248c99aa1a3c7d74b346ef048ed514ca/srlinux-gpt-sticker_v1_webp.webp){ width=20% align=left} @@ -123,13 +126,11 @@ Depending on which version of SR Linux you're running you will need to run the r ``` === "YUM (rpm)" - To speed things up in YUM/rpm system we will disable all the repos except for the one that contains the `srlgpt` package. That is why the command looks a bit more bulky. - You can still opt to use the regular `bash sudo yum install srlgpt` command, but it will take longer to update caches for all repos. + To speed things up in YUM/rpm system we will disable all the repos except for the one that contains the `srlgpt` package. - ```text title="paste this two-line command into your CLI" + ```srl title="paste this two-line command into your CLI" --{ running }--[ ]-- - A:srl# bash "sudo yum makecache --disablerepo=* --enablerepo=srlinux && - sudo yum install -y --disablerepo=* --enablerepo=srlinux srlgpt" + A:srl# bash sudo yum install -y --disablerepo=* --enablerepo=srlinux srlgpt ``` Wait a few seconds for the app to download and install. It is that simple! diff --git a/docs/stylesheets/nokia.css b/docs/stylesheets/nokia.css index 1650a522..a036da26 100644 --- a/docs/stylesheets/nokia.css +++ b/docs/stylesheets/nokia.css @@ -171,4 +171,49 @@ th { */ .md-typeset .embed-result { margin-top: -1.125em; -} \ No newline at end of file +} + +/* START mkdocs Badge elements (version) */ +.md-typeset .mdx-badge { + font-size: 0.85em; +} + +.mdx-badge__icon .twemoji { + height: 1.35em; +} + +[dir=ltr] .md-typeset .mdx-badge__icon { + border-top-left-radius: .1rem; + border-bottom-left-radius: .1rem; +} + +[dir=rtl] .md-typeset .mdx-badge__icon { + border-top-right-radius: .1rem; + border-bottom-right-radius: .1rem; +} + +.md-typeset .mdx-badge__icon { + background: var(--md-accent-fg-color--transparent); + padding: .2rem; +} + +.md-typeset .mdx-badge__icon:last-child { + border-radius: .1rem; +} + +[dir=ltr] .md-typeset .mdx-badge__text { + border-top-right-radius: .1rem; + border-bottom-right-radius: .1rem; +} + +[dir=rtl] .md-typeset .mdx-badge__text { + border-top-left-radius: .1rem; + border-bottom-left-radius: .1rem; +} + +.md-typeset .mdx-badge__text { + box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent); + padding: .2rem .3rem; +} + +/* END mkdocs Badge elements (version) */ \ No newline at end of file diff --git a/macros/macros.html b/macros/macros.html new file mode 100644 index 00000000..fee7e679 --- /dev/null +++ b/macros/macros.html @@ -0,0 +1,9 @@ +[[[% macro srl_version(version) -%]]] + + + + [[[version]]] +[[[%- endmacro %]]] \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index e0016ac3..276bf92a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -162,7 +162,8 @@ plugins: j2_variable_start_string: "[[[" j2_variable_end_string: "]]]" # include_yaml: - # - macros/data.yml + # - macros/vars.yml + include_dir: macros - blog: blog_dir: blog post_url_date_format: yyyy