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

Fix support for outputting documentation pages to root output directory #462

Closed
caendesilva opened this issue May 29, 2022 · 3 comments · Fixed by #480
Closed

Fix support for outputting documentation pages to root output directory #462

caendesilva opened this issue May 29, 2022 · 3 comments · Fixed by #480
Assignees

Comments

@caendesilva
Copy link
Member

Sometimes you just want a documentation site, and nothing else.

Unfortunately, setting output_directory to '' and '/' does not properly load the styles.

@caendesilva caendesilva self-assigned this May 31, 2022
@caendesilva
Copy link
Member Author

Caused by DocumentationPage::getCurrentPagePath() which should not include the slash if docsDirectory is empty.

public function getCurrentPagePath(): string
{
    return  Hyde::docsDirectory().'/'.$this->slug;
}

@caendesilva caendesilva changed the title Add support for outputting documentation pages to root output directory Fix support for outputting documentation pages to root output directory May 31, 2022
@caendesilva
Copy link
Member Author

caendesilva commented May 31, 2022

  • The sidebar header title is still linking to a less nested path. Needs to be fixed.
    Update: fixed, had same root cause. 4b5af09

caendesilva added a commit that referenced this issue May 31, 2022
@caendesilva
Copy link
Member Author

caendesilva commented May 31, 2022

  • The "back to home page" button should probably be removed for root documentation pages too.
    Update: The Lagrafo styles currently expect that there is a footer. I'll see about renaming the label instead

Update 2: This does not fall in the 80% use case so I won't add complexity for this edge case at this point in time unless someone requests it.

An easy fix is adding the following CSS:

#lagrafo-app #sidebar #sidebar-navigation {
	height: calc(100vh - 4rem);
}

#lagrafo-app #sidebar #sidebar-footer {
	display: none;
}

caendesilva pushed a commit that referenced this issue Sep 1, 2022
…-same-format-for-create-method-as-constructor

Clean up author model hydephp/develop@e040a51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant