question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Get content of subdirectories also

See original GitHub issue

Feature Idea

When fetching a content from a directory it would be awesome to have the content from the sub directories listed as well.

Expected behaviour

-| content/
---| articles/
------| article.md
------| new/
---------| inside-new.md

Current with the directory tree as above if I fetch the content as

await this.$content('articles').fetch()

only article is in the response. It would be awesome to have the content from subdirectory of articles, in this case new would be fetched as well. i.e. article and inside-new would all be in the resposne after fetch.

Possible solution

I agree not everyone would love to have this behavious by default. So I thought of two possible solutions to have this feature and also keep the current behavious

1. Pass a boolean parameter to .fetch() method, depending on which the subdirectory will be or won’t be fetched… Default can be false for the compatibility with current bahaviour.

2. Add a new method which acts just like fetch but gets content from subdirectories as well… something like .fetchDeep() or anything that makes sense.

Other stuffs

I am loving this module a lot. It makes lots of things really easier compared to how annoying they were earlier. Regarding the feature request, that is just my idea. I would love to know if that would not be possible or won’t be implemented.

❤️ Nuxt.js

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

30reactions
benjamincanaccommented, May 28, 2020

Hey @TheLearneer,

We’ve taken into account this feature already and will be working on it soon 😃.

Is should be more like:

await this.$content('articles', { deep: true }).fetch()
5reactions
benjamincanaccommented, Jun 4, 2020

@mathieunicolas This feature has been released in v1.3.0!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get contents of a sub directory in a Gitlab repository ...
I am trying to get a list of repository contents using Gitlab API from a repository subdirectory. Because top level access is working...
Read more >
[Feature Request] Browse Folders in Results List - voidtools
I know that I can get a list of all files and folders contained within a certain folder with the "parent:" function. But...
Read more >
Pocket's Top Feature Requests
Below is a list of some of the most popular feature requests that we have ... items to Pocket, the amount of storage...
Read more >
How to Get a List of All Files in a Directory With Python
In this tutorial, you'll be examining a couple of methods to get a list of files and folders in a directory with Python....
Read more >
O365 Update: Get Files and items from folders and subfolders
inside of that folder. If “Include Nested Items” is set to true, entries located inside of subfolders will also be returned; otherwise, they ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found