danielgtaylor / danielgtaylor/aglio
Local template and Body iteration?
- Dominant language
- CoffeeScript
- Stars
- 4.7k
- Forks
- 471
- PR merge metrics
- No merged PRs in 30d
Description
I don't know if this is a request, a question, or a bug. 😄
I'm trying to do two things:
1) Instead of using the built-in highlight on Req/Resp bodies, I want to iterate over the _lines_, and literally wrap them in `p` or `span` elements. (Needed to output to a content system that can't handle pre-formatted code/text, so I need to style with inline css...long story.) If I can get the key/values that's even better so I can format them differently, but I'll take what I can get. 😄
I can't quite figure out the format of the object delivered in `request.body`.
I tried `each thing in request.body` followed by `p= request.body.thing` and `request.body[thing]` and clearly I'm not accessing the object properly. This is either probably something very simple, or very impossible. I'm not above rewriting or patching something if needed.
2) This is even more basic. I have a folder, with just:
```
example.apib
index.jade
mixins.jade
```
copied from the theme branch. But no matter what I try, it often seems to try to ignore my updated `mixins.jade`, presumably pulling from the node install dir.
The command line I use is:
`aglio -i example.apib --theme-template ./index.jade -o foo.jade`
And I've tried various methods of `include`, like `./mixins.jade`, `mixins.jade`, and tried an absolute path but that requires setting a Jade `basedir` option that I don't know how to do if you're not using the JS API directly.
Thank you in advance on both issues/questions; this will REALLY help me solve a big project.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the command using example.apib, index.jade, and mixins.jade from the issue. Start by checking how the CLI loads request.body and resolves theme-template includes; done requires determining whether both requested customizations are supported and identifying the documented configuration or limitation.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100