Comments (2)
Below is a comment from #3 which I think belongs in this issue.
We are generating JavaScript Usage documentation via Assemble. We have a substantial amount of components to document. Component hbs files sit within sections and then modules. This means that the pages could be as many as 3 folders deep. Since we'd like to be able to just unzip the documentation and open an index.html file, we need to script out links between components relative to the current page.
For example in the example below i have 2 targets.
"sections": [ { "name": "Dataviz", "modules": [ { "name": "Chart", "components": [ { "name": "API", "examples": [ { "title": "Benchmark", "src": "dataviz/api/benchmark.html" }, { "title": "API Functions", "src": "dataviz/api/api.html" } ] } ] } ] } ]I want to generate links that are relative to each within "examples" above. Sometimes, like I said, there'll be 3 directories deep, but other times they may be one or two.
Lets assume my documentation is within "docs". The user will open up the index.html on the root.
file://localhost/Users/rrullo/working/com.foo/docs/index.htmlThis page will contain links to "dataviz/api/benchmark.html" and "dataviz/api/api.html". Which will go to file://localhost/Users/rrullo/working/com.foo/docs/dataviz/api/benchmark.html and file://localhost/Users/rrullo/working/com.foo/docs/dataviz/api/api.html.
Now if the user now navigates to file://localhost/Users/rrullo/working/com.foo/docs/dataviz/api/benchmark.html, we need to be able to have the navigate back to '../../index.html' off of /Users/rrullo/working/com.foo/docs/
The relative helper looked darn close to what I needed.
Thanks!
-Bob
from handlebars-helpers.
I believe we got this working.
from handlebars-helpers.
Related Issues (20)
- Comparation(#compare var1 "==" var2) with two variables doesn't work HOT 1
- Upgrade for new versions of the related plugins HOT 1
- does not export a 'register' function, cannot import HOT 1
- Create SECURITY.md
- Not splitting string by line breaks '\n' HOT 1
- todo: merge updates from https://github.com/Budibase/handlebars-helpers HOT 3
- Markdown Helper is broken...
- Vulnerability found (due to highlight.js) HOT 3
- isLast in nested forEach
- Titleize handlebar doesn't titleize input string correctly.
- Request: encode to hex HOT 1
- If loading all helpers the String helper reverse overrides the Array helper reverse. HOT 2
- An examples of working out averages on columns
- Handle empty fields
- String helper `split` doesn't split by empty string.
- This package does not install
- Fumanchu - A supported Handlebar + Handlebars-Helpers together! HOT 4
- query online
- Dead? Process to transfer ownership?
- Dependency "ent" uses deprecated Node punycode module
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 handlebars-helpers.