-
Notifications
You must be signed in to change notification settings - Fork 35
feat!: rewrite with nuxt kit and nuxt 3 support #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for the pull request @maciejpedzich. I've made an overall review this is in a nice direction.
|
|
Thanks for the PR! I'll have a look in the next days |
|
Hi @pi0, thanks for the review! Sorry for taking so long, luckily I've found time to properly get down to adjusting the code accordingly with the changes you've requested. I'll let you when I'm done correcting everything. |
TheAlexLichter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments! Good job so far
|
|
||
| - name: Install dependencies | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: yarn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason for using npm here?
| run: yarn lint | ||
| run: npm run lint | ||
|
|
||
| - name: Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great to release a tested module (even if not fully tested).
|
|
||
| - Nuxt 3 ready | ||
| - Support for RSS 2.0, Atom, and JSON formats | ||
| - API similar to <a href="https://github.com/nuxt-community/feed-module"><code>@nuxt-communit/feed-module</code></a>, making migration over to <code>@nuxtjs/feed</code> painless |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - API similar to <a href="https://github.com/nuxt-community/feed-module"><code>@nuxt-communit/feed-module</code></a>, making migration over to <code>@nuxtjs/feed</code> painless | |
| - API similar to <a href="https://github.com/nuxt-community/feed-module"><code>@nuxt-community/feed-module</code></a>, making migration over to <code>@nuxtjs/feed</code> painless |
| <code-block label="NPM" active> | ||
|
|
||
| ```bash | ||
| npm install --save @nuxtjs/feed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| npm install --save @nuxtjs/feed | |
| npm install @nuxtjs/feed |
| ```ts | ||
| import axios from 'axios'; | ||
|
|
||
| async create(feed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest printing the feed object here:
feed: {
async create() { /** the rest **/ }
}
| import axios from 'axios'; | ||
|
|
||
| async create(feed) { | ||
| const { data } = await axios.get<{ articles: Article[] }>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use ohmyfetch or (node) fetch for the example?
|
|
||
| ## Dynamic module config - factory function | ||
|
|
||
| There are cases, where the _static array_ config could turn out to be more WET and less readable/flexible. For instance, what if you needed to generate feeds based on multiple different categories, which you may also want to fetch from an external API? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'WET' might not be clear to everyone. Maybe use something like "repeatable"?
| ) { | ||
| if (typeof options === 'function') { | ||
| return options(); | ||
| } else if (Array.isArray(options)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No else needed. Same below.
| name: '@nuxtjs/feed', | ||
| configKey: 'feed' | ||
| }, | ||
| setup(moduleOptions, nuxt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that SSG landed, the feed module could provide static feed generation directly too 😋
|
@manniL, @pi0 - I've decided to retire my custom Nuxt 3 compatible RSS feed module, and I'm afraid I won't be able to actively support the feed module as a community maintainer because I simply don't have the bandwidth to do it anymore. Feel free to reuse the code as a foundation for the official one. |
@maciejpedzich Thanks a lot for being that open and for the PR! I will try to move the module to Nuxt3 based on your code in near future (and give appropriate credits) 👍 |
Hey folks, is there any working sitemap generator these days that supports Nuxt 3 and Nuxt Content V2? |
|
Hi @manniL Is there a roadmap, todo list to finish the job initiate by @maciejpedzich ? |
|
Feel free to check #106. I haven't had the time to continue from here, so whoever wants to take a stab is good to go |
No description provided.