-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
refactor: refactoring hideSidebar
configuration.
#1396
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9c37c5c
[refactor] hideSidebar.
Koooooo-7 676f13a
[update docs] rt.
Koooooo-7 cfe1fa8
[refactor] hideSidebar.
Koooooo-7 3e7f27d
[update docs] rt.
Koooooo-7 6368d65
add test.
Koooooo-7 efb645d
Merge branch 'refactor-holdSidebar' of https://github.com/Koooooo-7/d…
Koooooo-7 170f6f7
snyc.
Koooooo-7 64261b2
refine.
Koooooo-7 45d1a12
snyc.
Koooooo-7 0066cf2
Merge branch 'develop' into refactor-holdSidebar
sy-records ed803cc
[refactor] hideSidebar.
Koooooo-7 64448e9
[update docs] rt.
Koooooo-7 e4daea5
add test.
Koooooo-7 51845af
snyc.
Koooooo-7 7061b70
refine.
Koooooo-7 54df5ee
snyc.
Koooooo-7 0a79581
Merge branch 'refactor-holdSidebar' of https://github.com/Koooooo-7/d…
Koooooo-7 9bfac00
fix: Can't search homepage content (#1391)
sy-records 23c44ee
may fix CI.
Koooooo-7 4b4f4d2
Merge branch 'develop' into refactor-holdSidebar
Koooooo-7 27e497e
Merge branch 'develop' into refactor-holdSidebar
Koooooo-7 2ac291e
Merge branch 'develop' into refactor-holdSidebar
sy-records File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
const docsifyInit = require('../helpers/docsify-init'); | ||
|
||
// Suite | ||
// ----------------------------------------------------------------------------- | ||
describe('Configuration Tests', function() { | ||
// Tests | ||
// --------------------------------------------------------------------------- | ||
test('Configuration hideSidebar', async () => { | ||
// Init docsify basic fully site | ||
const docsifyInitConfig = { | ||
config: { | ||
name: 'Docsify Name', | ||
hideSidebar: true, | ||
}, | ||
markdown: { | ||
coverpage: ` | ||
# Docsify Test | ||
|
||
> Testing a magical documentation site generator | ||
|
||
[GitHub](https://github.com/docsifyjs/docsify/) | ||
`, | ||
homepage: ` | ||
# Hello World | ||
|
||
This is the homepage. | ||
`, | ||
navbar: ` | ||
- [docsify.js.org](https://docsify.js.org/#/) | ||
`, | ||
sidebar: ` | ||
- [Test Page](test) | ||
`, | ||
}, | ||
routes: { | ||
'/test.md': ` | ||
# Test Page | ||
|
||
This is a custom route. | ||
`, | ||
'/data-test-scripturls.js': ` | ||
document.body.setAttribute('data-test-scripturls', 'pass'); | ||
`, | ||
}, | ||
script: ` | ||
document.body.setAttribute('data-test-script', 'pass'); | ||
`, | ||
scriptURLs: ['/data-test-scripturls.js', '/lib/plugins/search.min.js'], | ||
style: ` | ||
body { | ||
background: red !important; | ||
} | ||
`, | ||
styleURLs: ['/lib/themes/vue.css'], | ||
}; | ||
|
||
await docsifyInit({ | ||
...docsifyInitConfig, | ||
}); | ||
|
||
// Verify config options | ||
expect(typeof window.$docsify).toEqual('object'); | ||
expect(window.$docsify).toHaveProperty('hideSidebar', true); | ||
|
||
// Verify sidebar not exist | ||
expect(document.querySelector('aside.sidebar')).toBeNull(); | ||
expect(document.querySelector('button.sidebar-toggle')).toBeNull(); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anikethsaha Should we keep the style?
develop branch
now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just keep this configurations without adjusting much styles right now (dont let render code including much styles), and if there has much users proposal to make it that we can refine it again.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep them and not change them in the z versions.