Comments (3)
@ethan-kusters that should probably also be in docc-render? I think it's relatively easy to do, too.
from swift-docc.
I'm taking a look ;) So the good news is CodeListing
can show line numbers.
We just need to figure out how to best tell it to show line numbers, and what level of flexibility we want. If I read the code correctly, it looks for contentNode.showLineNumbers
for contentNodes that are codeListing
.
So hypothetically, we could do a few things here:
- Add an option like
@CodeListingsShowLineNumbers(true)
or similar. Options are usually scoped to the current page / article, and it feels janky. - See if we can change how we parse the ``` code block syntax to accept something like ``` showLineNumbers, similar to https://rehype-pretty-code.netlify.app/ on a level of a specific code block. That will be more involved, likely require some hacking in
swift-markdown
, BUT that will allow others to use that, too. - Make site-wide setting and pass it in an env variable or a build flag. That's probably a crappy option because those are obscure, and it will be difficult to document.
I feel like option 2 is what's generally expected with markdown-base documentation systems.
from swift-docc.
Would this be a good second issue for me to take a look at? I'm trying to learn more about this code base and would love to have something to do while I'm waiting on feedback from my pull request.
Admittedly, I'm probably going to need some guidence with attacking this issue, but I'm eager to give it my best shot. 😀
from swift-docc.
Related Issues (20)
- Typealiased type are not reflected properly in the documentation HOT 4
- Reenable DefaultDiagnosticConsoleFormatter HOT 1
- Crash when building locally HOT 4
- Duplicated diagnostic causing crash on DefaultDiagnosticConsoleFormatter HOT 8
- Overly strict warning when curating a module under a technology root HOT 19
- The wrong role is assigned to the technology-root node in article-only catalogs
- Any way to merge the index.json for multiple framework hosting on single Static site ? HOT 8
- Provide `@Embed` directive as an equivalent of HTML <embed/> or <iframe/>
- Swift-DocC should display C++ and Objective-C++ as their own source languages
- Sitemap for DocC Hosted Website HOT 6
- source link line number mismatch HOT 2
- Support svg images in Xcode inline documentation HOT 2
- Pass "link summaries" instead of "resolved information" in external documentation source responses
- Can't document - -= / /= operators HOT 8
- DocC generates inconsistent output for global Objective-C functions that are renamed to be associated with a type in Swift HOT 2
- Error when publishing to GitHub Pages HOT 6
- Linkable glossary
- Document Objective-C extensions with DocC HOT 2
- Xcode "Build documentation" not working with Swift Macro package in project HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-docc.