Coder Social home page Coder Social logo

sitemap-ts's Introduction

Hi there, I'm JB Aubrée 👋

I'm a Front-end Developer, VueJS, UnoCSS, Vite lover.


jbaubree's GitHub stats


Top Langs

sitemap-ts's People

Contributors

jbaubree avatar kantikuijk avatar mikezotovdev avatar renovate[bot] avatar uewtwo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sitemap-ts's Issues

Ability to add base path

Hi! I'm using your library to generate a sitemap for a VitePress site (https://abbekeultjes.nl/honeycomb). I'd like to be able to generate links in the sitemap for a hostname and base path (not sure if that's the best name): https://abbekeultjes.nl/honeycomb/. When I pass that url for the hostname option, the /honeycomb/ part is removed. This makes sense, since it's not part of the hostname.

Could you add an option to specify any path elements that get appended to the hostname?

Thanks!

If you pass to `outDir` absolute path in will convert it to relative and crash.

If you pass to outDir absolute path in will convert it to relative and crash.

    generateSitemap({
      outDir: 'C:/Users/kozac/Dev/kozack.me/docs/.vitepress/dist',
      dynamicRoutes: pages,
    })
Error: ENOENT: no such file or directory, open 'C:\Users\kozac\Dev\kozack.me\C:\Users\kozac\Dev\kozack.me\docs\.vitepress\dist\robots.txt'
    at Object.openSync (node:fs:599:3)
    at Object.writeFileSync (node:fs:2221:35)
    at generateSitemap (C:\Users\kozac\Dev\kozack.me\node_modules\sitemap-ts\dist\index.cjs:122:6)
    at Object.buildEnd (C:\Users\kozac\Dev\kozack.me\docs\.vitepress\config.js:72:43)
    at build (file:///C:/Users/kozac/Dev/kozack.me/node_modules/vitepress/dist/node/serve-1b26f7f9.js:41479:59)

Error during lint-staged in vitest.config.ts file

Hi! I'm about to create a MR to your repo with a new feature, but I encountered an error during lint-staged check run. The error is reproducible on the current master version of your repo, so probably it's not subject to my MR.

It seems to me, the config is written incorrectly, and there are some articles how to configure vitest.config.ts - all of them suggest another structure - code below (some articles - one, two, three). However, if I try to use the following code, nothing happens (just an empty output...or maybe it's the expected behavior?)

vitest.config.ts file

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    name: 'config',
    setupFiles: 'test/setup.ts',
  },
})

Here is what happen with the old config file. Simply speaking, the type is wrong.
Just open file (I use WebStorm) and see that:

image

Console after manual run of tsc --skipLibCheck --noEmit

image

If I run my code with a possible fix:

image

FYI: I use yarn, TS 4.9.4.

Could you help me to figure out that issue? Thanks!

Does not append dynamic routes

Hello,

Version 0.4.0 broke this package. Version 0.3.0 works properly.

Recently, the sitemap output does not correctly append the dynamic route. Instead, it just puts 'route' at the end of each item.

For instance, this is what happens when I give dynamicRoutes: ['/about'] as an option:

    <url>
        <loc>
            https://example.com/route
        </loc>
        <lastmod>
            2023-05-06T04:35:50.973Z
        </lastmod>
        <changefreq>
            daily
        </changefreq>
        <priority>
            1.0
        </priority>
    </url>

Dynamic routes like /user/[id] generated in sitemap

when ssg build with options {"includeAllRoutes": true} or with a includedRoutes function, file like /user/[id].vue got generated to /user/:id.html , the exclude option support string only, so how could i remove these from the result?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency vite to v4.5.3
  • fix(deps): update dependency @antfu/utils to v0.7.7
  • chore(deps): update dependency bumpp to v9.4.0
  • chore(deps): update dependency simple-git-hooks to v2.11.1
  • chore(deps): update dependency typescript to v5.4.5
  • chore(deps): update dependency @antfu/eslint-config to v2
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency esno to v4
  • chore(deps): update dependency vite to v5
  • chore(deps): update pnpm to v9
  • chore(deps): update vitest monorepo to v1 (major) (@vitest/coverage-v8, vitest)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v3
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v3
npm
package.json
  • @antfu/utils 0.7.6
  • fast-glob 3.3.1
  • sitemap 7.1.1
  • xml-formatter 3.5.0
  • @antfu/eslint-config ^0.43.1
  • @antfu/ni 0.21.8
  • @babel/types 7.23.0
  • @types/node 20.8.7
  • @vitest/coverage-v8 ^0.34.6
  • bumpp 9.2.0
  • eslint 8.51.0
  • esno 0.17.0
  • lint-staged 15.0.2
  • pnpm 8.9.2
  • rimraf 5.0.5
  • simple-git-hooks 2.9.0
  • taze ^0.11.4
  • typescript 5.2.2
  • unbuild 2.0.0
  • vite 4.5.0
  • vitest 0.34.6
  • pnpm 8.9.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.