Comments (1)
One solution would be to make src/utils/sitegraph-generator.js
ignore section links. Then it wouldn't throw any errors when the test is run. However, then some section links could be broken but not caught as an error during testing.
A more robust solution would be to make sure that the linked section (e.g. #beginner-guides
) actually exists in the markdown file. I don't know much about parsing markdown in JS, but I'm sure there's a library for it. From a quick search, I found https://github.com/remarkjs/remark-validate-links, though I believe that requires the entire remark
package as a dependency. So a lighter-weight package might be better. Alternatively, we could write our own section-link verifier: something that loads the entire markdown file, searches for section links, then searches the file for a section that corresponds to the link. Off the top of my head, a regex might be useful; the test could even be a shell script using grep
.
Side note: the entire sitegraph generator file was last touched 2 years ago (see git blame
) and I think this comment sums it up pretty well:
https://github.com/PittCSWiki/pittcswiki/blob/2c621c6104720d96f79bc5d2f20921e23c38fb80/src/utils/sitegraph-generator.js#L7
from pittcswiki.
Related Issues (20)
- Getting Started with Machine Learning HOT 1
- Getting Started with Data Science HOT 1
- Getting Started with Quant Trading HOT 2
- why tf does the README not include how to run the wiki on local HOT 1
- Create Course Categories
- Generic Career Advice Doc
- Add Explanation of Hosting to Getting Started with Web Dev Guide HOT 1
- Create an FAQ Section on at the bottom of /zero-to-one HOT 1
- Make the navigation on the left side of /zero-to-one span the entire height of the screen
- Remove "Getting Started with X" guides from extra dir
- Improve Landing Page Accessibility
- Broken coop link on capstone page HOT 1
- GH Actions CI Fails Installing Dependencies HOT 1
- CSS Error in Course Exploration Page HOT 1
- Had to revert security updates
- Outdated links in ace-your-interview section HOT 1
- Error: "digital-envelope-routines:unsupported" When Using Node Version > 16
- Article on Product Management
- Article on Azure
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 pittcswiki.