-
Notifications
You must be signed in to change notification settings - Fork 7
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
Build fail with zh locale #9
Comments
Funny, I also got the same error but with The seo plugin is based on And when the seo plugin encounters a date that can't be parsed through Ideally, it would be great to have a new key |
Opened vuejs/vuepress#2843, hoping this will help. |
As a workaround, you can do this:
// .vuepress/theme/index.js
module.exports = {
extend: '@vuepress/theme-default',
plugins: [
['@vuepress/last-updated', {
transformer(timestamp) {
return timestamp;
}
}],
'seo',
],
// ...
}
<template>
<footer class="page-edit">
<div
v-if="editLink"
class="edit-link"
>
<a
:href="editLink"
target="_blank"
rel="noopener noreferrer"
>{{ editLinkText }}</a>
<OutboundLink />
</div>
<div
v-if="lastUpdated"
class="last-updated"
>
<span class="prefix">{{ lastUpdatedText }}:</span>
<time class="time">{{ lastUpdated }}</time>
</div>
</footer>
</template>
<script>
import PageEdit from '@parent-theme/components/PageEdit.vue';
export default {
extends: PageEdit,
computed: {
lastUpdated() {
return new Date(this.$page.lastUpdated).toLocaleString(this.$lang)
}
}
};
</script> This way, you don't have any issues anymore from the seo plugin, and the |
Also affects To fix this you can add the following property in your themeConfig.sitemap.dateFormatter: (time) => new Date(time).toLocaleString("es-CL") |
See here: https://github.com/sanic-org/sanic-guide/runs/2158958551?check_suite_focus=true
It seems like I am running into build issues, and I think this is related to the locale. I am build fine locally, but our CI and other contributors in China seem to be getting this error.
Any thoughts?
The text was updated successfully, but these errors were encountered: