CalebBarnes / nextwp

http://nextwp.org/
7 stars 0 forks source link

Documentation/rest api functions #19

Closed Renesauve closed 6 months ago

Renesauve commented 7 months ago

For review: getSingleItem getSiteLogo getSiteIcon getOptionsPage

Github issue #3

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextwp-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 1:26am
nextwp-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 1:26am
Renesauve commented 7 months ago

Not sure if all of these need to be documented, what do ya think?

image

CalebBarnes commented 7 months ago

Not sure if all of these need to be documented, what do ya think?

image

I think the only stuff we need to document are the functions exported from packages/core/index.ts

Renesauve commented 7 months ago

Still not 100% sure on some of this, do you think we should remove environment variables from some of these?

Also how are the descriptions, I think they are okay right now but could probably be changed to be more descriptive

mosesintech commented 6 months ago

I noticed a typo in the WpSettings type. I could open a PR, but figured since this one was already opened I'd just comment here instead.

    export interface WpSettings {
      title?: string;
      description?: string;
      url?: string;
      posts_per_page?: number;
      page_on_front?: number;
      page_for_posts?: number;      site_logo?: number;
      site_icon?: number;
      email?: string;
      timezone?: string;
      date_format?: string;
      time_format?: string;
      start_of_week?: number;
      language?: string;
      use_smilies?: boolean;
      default_category?: number;
      default_post_format?: string;
      show_on_front?: string;
      default_ping_status?: string;
      default_comment_status?: string;
    }

site_logo?: number; is tabbed next to page_for_posts?: number; instead of its own line.

This is the Return Type for getSiteSettings.

Let me know if you want me to just open my own PR. I know it's technically not in scope for this PR.