Giter Club home page Giter Club logo

Comments (3)

mbostock avatar mbostock commented on May 22, 2024

The bug description is wrong: we already handle the case of a missing h1 correctly and display untitled. For example, here is test.md:

testing

Which renders as:

Screenshot 2023-10-22 at 10 38 12ā€ÆAM

You can see the code here:

https://github.com/observablehq/cli/blob/21fcad3e1653962d28b051604ca10141597e80b6/src/navigation.ts#L21

I suspect what may be happening here instead is that there is an h1, but it has something like a dynamic title or other edge case thatā€™s causing the inferred title to be the empty string rather than nul; this would result in us not showing ā€œUntitledā€.

from framework.

CobusT avatar CobusT commented on May 22, 2024

I think the bug was a suggestion to show the filename instead of 'Untitled'... at least that is how I read it :-)

from framework.

mbostock avatar mbostock commented on May 22, 2024

Oh, sorry. šŸ¤¦ I didnā€™t read.

For the sidebar, Iā€™m not sure if weā€™ll use the title or the file name at all; more likely the user will need to provide a YAML/JSON configuration that enumerates the sections and pages of the site. That way the user can control the order in which they appear and the titles (and even the paths ā€” so you could for example link to the same page multiple times with different query strings). This will also allow you to have ā€œunlistedā€ pages that donā€™t appear in the sidebar but may be linked to from other top-level pages.

Iā€™m going to close this issue in favor of configurable navigation in the sidebar.

from framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.