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

Allow customization of title to include link to folder level above #4901

Open
5 tasks
kdheepak opened this issue Mar 21, 2023 · 2 comments
Open
5 tasks

Allow customization of title to include link to folder level above #4901

kdheepak opened this issue Mar 21, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good-first-issue Good for newcomers, fairly well defined
Milestone

Comments

@kdheepak
Copy link
Contributor

kdheepak commented Mar 21, 2023

Bug description

I have a blog that has the following directory structure:

$ tree
.
├── 404.qmd
├── _quarto.qmd
├── blog
│  ├── index.qmd
│  ├── welcome-to-my-blog
│  │  └── index.qmd
│  └── writing-papers-with-markdown
│     └── index.qmd
└── index.qmd

When visiting the page for welcome-to-my-blog, there's current no way for a user to go back up just one level:

image

It is possible for users to click on the logo icon to go to the home level though.

It would be nice if this could be made to be like this instead:

image

where ~ was clickable to get to the root level and blog was clickable to blog folder level. Ideally it would be customizable with what text we'd want to show there. You wouldn't need to add / like I have in the screenshot, users can probably customize that with css before and after selectors. Users can always hide this by setting display: none.

What are your thoughts?

I'm using title: false in the navbar but adding a link to the logo in the _quarto.yml for the screenshots above:

website:
  title: "kdheepak"
  favicon: ./_quarto/favicon.svg
  search:
    location: navbar
  site-url: https://kdheepak.com
  repo-url: https://github.com/kdheepak/kdheepak.github.io
  repo-actions: [edit, issue]
  open-graph: true
  twitter-card: true
  sidebar:
    alignment: left
    style: docked
  navbar:
    title: false
    logo: _quarto/favicon.svg
    collapse: false
    search: true
    pinned: false
    right:
      - icon: github
        href: https://github.com/kdheepak
        aria-label: GitHub
      - icon: rss
        href: index.xml
        aria-label: RSS

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.
@kdheepak kdheepak added the bug Something isn't working label Mar 21, 2023
@cscheid cscheid added enhancement New feature or request and removed bug Something isn't working labels Mar 21, 2023
@dragonstyle
Copy link
Collaborator

I think some form of breadcrumbs would be a nice addition (though I see it more as a navigation aide so would expect it to appear somewhere other than the title itself). We have this for responsively collapsed navigation now, so would be nice to support when in a responsive full screen size as well...

In the meantime, you can place markdown in the title of your listing page, like so AFAIK:

---
title: "[~](/)/[blog](/blog)"
listing:
  contents: posts
  sort: "date desc"
  type: default
  categories: true
  sort-ui: false
  filter-ui: false
page-layout: full
title-block-banner: true
---

@dragonstyle dragonstyle added this to the v1.4 milestone Mar 21, 2023
@dragonstyle dragonstyle added the good-first-issue Good for newcomers, fairly well defined label Mar 21, 2023
@dragonstyle dragonstyle self-assigned this Mar 21, 2023
@kdheepak
Copy link
Contributor Author

I agree that it'd be nice to have in the navbar.

Btw, this suggestion doesn't work:

title: "[~](/)/[blog](/blog)"

at least not out of the box.

It seems to generate the appropriate HTML but in the theme I'm using the link color seems to be the same as the background.

image

Also, I'll have to change the title for all the blogs to have a back link for the individual blog posts, which doesn't seem practical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers, fairly well defined
Projects
None yet
Development

No branches or pull requests

3 participants