Comments (3)
Nah, you did it correctly. The shitty thing is that there are a couple of options that I can see right now, none of which gets us to the goal of having super-readable urls:
- munging it slightly (clojuredocs.org/org.thnetos|client/my-ns/my-var)
- Completely (clojuredocs.org/v/123/org-thnetos-client/my-ns/my-var)
- encoding (clojuredocs.org/org.thnetos%2Fclient/my-ns/my-var, which should but dosen't work with the current stack).
I have to look into this a bit more, but the issue is that some of the allowed characters in lib / ns / var names are going to collide with url reserved characters, so we'd have to map each of those collisions to new chars, or encode. Encoding would solve this problem but affects readability and mentally generating CD urls on the fly.
Ultimately I think I'm just putting off really putting some thought into it in favor of cleaning up the codebase, but we should definitely talk about it on tues.
from clojuredocs.
Turns out this will be fixed as part of the versioning stuff. As discussed today, we went the munging route:
- Added a
url_friendly_name
column to thelibraries
andfunctions
tables - On import (and migration), names are munged:
?
->_q
,/
->\space
,\space
->_
- Result is stored in the
url_friendly_name
column
I'm still on the fence about the 'encoding' scheme, any suggestions?
from clojuredocs.
commit 0b51e2b
from clojuredocs.
Related Issues (20)
- Search inside docstrings
- Idea: Add a downloadable static copy, for offline viewing HOT 7
- Voting on answers HOT 3
- Twitter icon broken on the homepage HOT 1
- Can't use search bar if width is under 768px.
- Html injection spam
- Missing vars in clojure.xml
- Need to update Kira logo HOT 1
- Link to core.match documentation similarly to link to core.async HOT 1
- Add tools.build doc
- Update ClojureDocs to v1.11 HOT 6
- Bad docstring for if
- Seach form hidden on clojure.string page
- 4clojure link is dead HOT 2
- Document the options to clojure.java.io.{reader,writer,input-stream,output-stream}
- DEFN podcast invitation
- ClojureScript support in docs and output? HOT 1
- Slow responses from the live site today HOT 8
- Add clojure.data.csv?
- Experience notes spinning up clojuredocs in local HOT 1
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 clojuredocs.