mkdocs-techdocs-core icon indicating copy to clipboard operation
mkdocs-techdocs-core copied to clipboard

Left navigation gets stepped on with mkdocs-material blog feature, for full blog posts, at wide resolution

Open bcotton opened this issue 1 year ago • 6 comments

I'm using the new 1.3 version of this plugin, which enables the mkdocs-material blog plugin.

My mkdocs.yaml file looks like this:

site_name: 'Internal Blog for Bob Cotton'

theme:
  name: material
  features:
    - navigation.sections
nav:
  - Home: 'index.md'
  - Blog:
     - 'blog/index.md'

plugins:
  - techdocs-core
  - blog:
      post_url_format: "{date}/{slug}"

When the site get rendered, both under our backstage instance, and using techdocs-cli everything looks great, The nav on the left is correct. All the blog features are working.

Except when you drill down into a full blog post ("continue reading" or click on a post header) and you have your screen resolution fairly wide (anything wider than when the hamburger gets rendered on the right side)

When looking at the list of posts, the left nav is great:

CleanShot 2023-12-06 at 09 05 35@2x

However, when you select, or link directly to a post, the left-hand navigation get smashed into the content. e.g.

CleanShot 2023-12-06 at 09 22 09@2x

When run under the techdocs-core container, without the backstage wrapper, it looks like this:

CleanShot 2023-12-06 at 11 17 37@2x

I've created a repo with content and instructions to reproduce the issue https://github.com/bcotton/techdocs-blog-testing

Not a front-end dev, so poking in the dark here, however, Looking at chrome dev-tools, if I disable

.md-sidebar {
  position: fixed;
}

Then it's lays out correctly

CleanShot 2023-12-06 at 11 20 21@2x

bcotton avatar Dec 06 '23 16:12 bcotton

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 05 '24 01:02 github-actions[bot]

This would be nice to fix up. We have some interest in having an easy-to use blog in our org but this isn't usable in its current form.

brianphillips avatar Feb 19 '24 13:02 brianphillips

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 21 '24 01:04 github-actions[bot]

This is still an issue

brianphillips avatar Apr 22 '24 12:04 brianphillips

Hi @bcotton and @brianphillips, is this truly an issue in this repo or is it really something that needs to be fixed in the main Backstage repo? The code for this does seem to be over there:

https://github.com/backstage/backstage/blob/30f11804b9a5c64605d5c3416dc009d18abece76/plugins/techdocs/src/reader/transformers/styles/rules/layout.ts#L66-L74

awanlin avatar Jun 27 '24 18:06 awanlin

It's unclear to me where this should be reported. I'll report it against the main repo.

bcotton avatar Jul 11 '24 01:07 bcotton

https://github.com/backstage/backstage/pull/26678 should fix it.

PeaWarrior avatar Sep 13 '24 20:09 PeaWarrior