Skip to content
This repository was archived by the owner on Aug 9, 2020. It is now read-only.

Conversation

@zsherman
Copy link

  • Allow choice of syntax highlighter (Prism or Highlight.js)
  • Add divider component to sidebar
  • Update markdown styling and fix headers
  • Update search styles, scroll active item into view, better empty state, add icons, detect outside click
  • Add automatic table of contents generation
  • Add some responsive layout logic
  • Add better content loading state

@coveralls
Copy link

coveralls commented May 26, 2018

Pull Request Test Coverage Report for Build 163

  • 2 of 8 (25.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 54.92%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/filesystem.js 1 2 50.0%
src/core/output.js 1 2 50.0%
src/core/socket.js 0 2 0.0%
src/core/syntax.js 0 2 0.0%
Totals Coverage Status
Change from base Build 146: -0.01%
Covered Lines: 330
Relevant Lines: 621

💛 - Coveralls

await fs.outputJson(outputJson, { content: item.content })
await fs.outputJson(outputJson, {
content: item.content,
toc: toc(item.content).json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd extract this all to another function since you're using it again in src/core/socket.js.


const content = `module.exports = {
theme: require('${rsh}/styles/prism/${theme_custom.syntaxTheme}').default,
theme: require('${rsh}/styles/${syntax.renderer}/${syntax.theme}').default,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely don't think the user should have to specify prism or highlight. We should automatically default to one or the other depending on which one supports the language.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but let's roll that up into the language detection epic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we do default to Highlight.js now.

syntaxTheme: 'prism',
syntaxLineNumbers: false,
prefixTitles: true,
tableOfContents: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either use table_of_contents, or switch up the other config options to use camel case. Should stay consistent.

render={({ staticContext }) => (
<Page
route={staticContext || data}
route={staticContext ? JSON.parse(staticContext) : data}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh? This will break things. staticContext is already a JSON object, trying to parse it again will throw an error.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah not sure why I did that...fixed.

@zsherman zsherman merged commit e49fff4 into master May 26, 2018
@zsherman zsherman deleted the enhancement/timber-styles branch May 26, 2018 20:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants