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

Generation of Sidebar and Footer does not work when the Sidebar and/or Footer already exist in wiki #108

Closed
ykuijs opened this issue Jan 25, 2022 · 1 comment · Fixed by #110
Labels
bug The issue is a bug.

Comments

@ykuijs
Copy link
Member

ykuijs commented Jan 25, 2022

Details of the scenario you tried and the problem that is occurring

After the change in PR #106 the sidebar is never regenerated once it has been generated once. The code checks if the files exist in the cloned path instead of the WikiSource.

Discussed this with @johlju, he will fix this and submit a PR.

Steps to reproduce the problem

Create a sidebar in the target wiki, don't place a sidebar in the WikiSource and publish a new wiki. The sidebar won't be regenerated in this case.

Expected behavior

The code only regenerates the sidebar and/or footer when it does not exist in the WikiSource

Current behavior

The code never regenerated new sidebar and/or footer after it has been generated once

Suggested solution to the issue

$tempPath should be updated with $Path in the following two lines:

New-WikiSidebar -ModuleName $ModuleName -Path $tempPath
New-WikiFooter -Path $tempPath

The operating system the target node is running

Version and build of PowerShell the target node is running

PSv5.1

Version of the module that was used

v0.10.2

@ykuijs
Copy link
Member Author

ykuijs commented Jan 25, 2022

@johlju While you are at it, maybe also update the incorrect examples here:
https://github.com/dsccommunity/DscResource.DocGenerator/blob/main/source/Private/Copy-WikiFolder.ps1#L23
https://github.com/dsccommunity/DscResource.DocGenerator/blob/main/source/Public/Publish-WikiContent.ps1#L51

These are both referring to a WikiSource parameter that doesn't exist (anymore).

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Jan 25, 2022
ykuijs added a commit to ykuijs/DscResource.DocGenerator that referenced this issue Jan 26, 2022
johlju pushed a commit that referenced this issue Jan 26, 2022
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants