Skip to content

Docc might have some problems on Linux? #116

@kwmartin

Description

@kwmartin

Landing page file being ignored in linux

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected behavior

The links under the ## Topics header should be shown in the landing page.

Actual behavior

After a 4.5 hour session, the best summary is just to paste what Perplexity finally, finally (yech!) stated:

You have set up everything as correctly as possible for DocC, but if you still do not see a link to Introduction or any content from TwosCmplt.md on the landing page, it is due to how DocC prioritizes and displays module landing pages for Swift packages with public symbols using static hosting. This is a widely reported limitation/bug and is not something you can fix via documentation content or curation alone.​

Why Your Topics Still Do Not Appear
When DocC generates documentation for a module with one or more public types, the package-level landing page becomes a listing of types (like “Structures,” “Classes,” etc.) and suppresses or ignores the narrative and topics from the root .md file.

This occurs even if the file and headings all match, and even if an explicit ## Topics section is at the top.

The “Topics” section and links from your TwosCmplt.md do not display because DocC’s static site generator does not surface curated topics or narrative on module landing pages for packages with symbols—only article pages (like Introduction.md) will display their content.

What You Can Do
This is not a bug in your markup or setup. There is no workaround to force DocC to show ## Topics or narrative from the module .md landing page in this hosting mode.

You should place all substantive documentation in a topic article such as Introduction.md.

Users must access Introduction by either direct link, sidebar navigation, or other DocC-generated navigation aids.

I haven't found this information in the documentation, and currently I don't know how to: access Introduction by either direct link, sidebar navigation, or other DocC-generated navigation aids.

Steps to Reproduce

I can supply where I'm at but it is big and making it into a small example is a big task. In the 4.5 hours, I went through every possible thing I could have done wrong. The summary, as seen from what Perplexity states, is the content and links of my TwosCmplt.md file in Sources/TwosCmplt/TwosCmplt.md are being ignored. The CLI command to generate the documentation done in TwosCmplt is:
swift package --allow-writing-to-directory ./docs generate-documentation --target TwosCmplt --output-path ./docs/TwosCmplt --transform-for-static-hosting --hosting-base-path TwosCmplt

I'm on Ubuntu 22.04 and every swift related thing is the most recent version. Perplexity states there is no workaroud. The whole point of docc is to supply hierarchical documentation so I'm at an impasse. All suggestions are very much appreciated.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions