handlebars-lang / docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for handlebars.js and the handlebars-language
Home Page: https://handlebarsjs.com
License: MIT License
Documentation for handlebars.js and the handlebars-language
Home Page: https://handlebarsjs.com
License: MIT License
Please feel free to add comments, feedback, or pushback on any of these. I (or anyone with edit rights) can update this list based on feedback in the comments.
Style / layout
I have no preference regarding the style at all. Please feel free to give suggestions or point out sites that you love.
For the most part, the templates and markdown content will be relatively unaffected by the styling decisions we make. Thus, for the time being, I'm going to just implement a basic site with default theme that gives us something to visualize, then we can completely change that later when we decide on the "real" theme/design.
Areas
Just thinking out loud... feedback would be great.
Search
We can use any solution for this. If no one objects, I recommend using algolia.
See handlebars-lang/handlebars.js#1300 for details
I was going through https://github.com/handlebars-lang/docs/blob/master/src/contributing/index.md#what-can-i-contribute.
What is the new site's location, or does it need to be created and deployed?
It would be nice if one could test compile- and runtime-options in playground.
Missing documentation for #if includeZero=true to make #if treat 0
as truthy.
PR here:
#62
I just wanted to get some feedback on these things:
(while/if I'm waiting for answers I'll just go ahead and push up what was generated by my scaffolding tool, then we can amend the information based on feedback to this issue)
cc @wycats @nknapp (not sure who else should be mentioned on this)
(edited to add CC
checklist item)
In Literal Segments it says:
JavaScript-style strings,
"
and'
, may also be used instead[
pairs.
Not quite sure if this should be:
JavaScript-style strings,
"
and'
, may also be used inside of[
pairs.
or:
JavaScript-style strings,
"
and'
, may also be used instead of[
pairs.
I think it's the first one?
The examples on https://handlebars-draft.knappi.org/guide/partials.html are not interactive yet.
It would be nice to have them turned in interactive examples, preferable with data that is a part of from https://github.com/handlebars-lang/docs/blob/master/src/examples/_example-base-data.yaml
It seems I can't push to this repository. It's probably related to third-party access settings on the org, if someone could look into it.
The snippet is empty as can be seen here (https://handlebarsjs.com/installation/precompilation.html#usage):
I did some tracing and found the corresponding part in the md:
docs/src/installation/precompilation.md
Line 47 in 2178bc5
Which seems to be a custom syntax extension to VuePress' markdown, handled by this plugin here:
But the above part seems to be authored quite some time ago. So, I suspect that one or more of these things might have changed since 30f6884 and gone unnoticed:
Or maybe something else. But I'm not familiar with VuePress or tapping into md parsers, so I just wanted to report the issue and my contemplation on it ¯\(ツ)/¯ Hope this helps!
On https://handlebars-draft.knappi.org/guide/builtin-helpers.html, the documentation for the following helpers is still missing:
with
lookup
log
blockHelperMissing
helperMissing
The documentation can be copied mostly from http://handlebarsjs.com/builtin_helpers.html but should be converted to proper markdown.
Ideally, the examples are replaced by interactive examples.
continuing the discussion from handlebars-lang/handlebars.js#1345
@nknapp per your last comment, how about if we just start adding the project scaffold and build out from there?
Fwiw, I don't have any hard requirements or expectations, I just like the idea of helping out with this. We benefit from it because we use handlebars a lot, and we get a lot of handlebars questions on our projects. Improving the handlebars docs will help with that (which we're obliged to do). To that end, if there are things you want to get started on, please feel free to do that, then I'll just pull down whatever you do and join along. @doowb and I are easy going and can adapt to whatever work style we need to.
https://handlebarsjs.com/installation/precompilation.html#usage
what does --data
expect for a value? a json file? a json payload? raw javascript as a string?
There are new runtime-options in 4.6 and a new function is passed to helpers in the options-parameter.
see handlebars-lang/handlebars.js#1633 for details
The "lookup"-helper can be used as example on how to use "options.lookupProperty" in a custom helper.
I was just wondering if there is a reason for that or if anyone is open to a conversation about building on it. If not, feel free to close it, or let me know if I should.
I thought, maybe in the long run we might need someone who has experience writing technical documentation. I am a software engineer, not a writer, although I like to write. But I think some of the things I write might be hard to understand. Even for the structure of the site, some opinions might be helpful.
If anybody knows somebody, that would be great.
Linked to #87.
Because there's no such open issue about implementations in other programming languages, I'll start.
handlebars
crateThroughout the site, the <Example examplePage=... />
is used to include interactive examples.
The newer 'is more flexible and be embedded more fluently into the text. I would like to see the occurrences of
be replaced by
`.
If you are attempting to do this, please have a look at the documentation for interactive examples first. You probably need to rewrite the text around the embedded example as well. The original formulation on https://handlebarsjs.com/ can help you do that.
Hi,
The doc of built-in #each
has the following assertion:
When iterating over an object only the
@first
is available.
I believe that this assertion is not true since 2014 (this commit).
It is true that some implementation have not implemented this by default (see my ticket for .NET), but please consider updating the assertion.
Thanks,
Yehoshua
On https://handlebars-draft.knappi.org/topics/precompilation.html, there are some chapters missing.
The sections are marked with a "TODO" text. The contents can be compied from http://handlebarsjs.com/precompilation.html
The usage output at the top of the "Usage" section and the box following "On the client side you have Javascript along the lines of the following." should ideally be included from a file in src/usage-examples/precompilation
so using the syntax
<<< @/src/usage-examples/precompilation/handlebars-usage.txt
and
<<< @/src/usage-examples/precompilation/example.precompiled.js
This would enable us to auto-generate its contents with the latest.
If you feel really good, you can try to create a vuepress-plugin that automatically creates those files using the latest version of Handlebars.
Hi,
I have a lookup table cached in Redis, [productId: string]: string
An async service that returns the productName based on productId
The context passed to the template is like:
productIds: ["1", "2"]
Template looks like:
{{#array}}{{ translate productIds }}{{/array}}
Any solution with handlebars? (Async + Handlebars + Typescript)
I am pretty excited about this, because it means one milestone in a project I have been working on during the last months:
I think the new handlebars site is now ready to go live. It may not be perfect yet, but it should contain all information from the old site. In some cases more, and it is definitely easier to use, search and play around with.
I have setup up a two stage deployment workflow. That way, changes can be previewed on master
and then merged in to the production
-branch via PR.
production
-branch will be deployed to the https://handlebarsjs.knappi.org
Currently, I am using the following domains:
My goal would be to move them all to
@wycats I don't have access to those domains and no full access to the handlebars-site
project . What I would like you to do is:
github.com/handlebars-lang
handlebarsjs.com
and push to the production
-branch.I can do the rest myself, but the last step should ensure that handlebarsjs.com
does not go down in between. It may loose SSL for some time though.
I am not colorblind; I am having trouble reading text on .footer
and .page-nav
. When using WebAIM Contrast Checker, the color combination for text and background fails tests for WCAG AAA and WCAG AA. The contrast should at least pass WCAG AA for better readability.
I noticed that there is a bot
repo here on the handlebars-lang org.
Assuming the intent was to add a bot for helping with issues, etc. Is there a bot already set up somewhere or does anyone have a preference regarding the bot we use? @doowb and I created a bot system that we use with a lot of our projects. It's been really helpful.
We don't need to use that, but if no one has a preference we can hook that up here, along with custom template and messaging, etc.
I have now made a new attempt to build a new Handlebars site.
The auto-deploy to gh-pages via travis is still missing.
Could anybody with access to the Handlebot please add the secret variable GITHUB_TOKEN to
.travis.yml
so that travis can deploy to github pages?
Mustaches starting with {{&
are not escaped, like triple-mustaches. I think we should mark this as deprecated, but it should be documented.
Related testcase/example is here: https://github.com/wycats/handlebars.js/blob/e97685e989526a501d5884a9c265891d52bf3a3e/spec/basic.js#L198-L203
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.