Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ home: true
### Localising news articles

To localize a news article, just add a file with the same name to the
corresponding language folder such as `/content/zh/`, i.e.:
corresponding language folder such as `/content/zh-cn/`, i.e.:

```
/content/zh/news/2024-09-18-aosc-os-relnote.md
/content/zh-cn/news/2024-09-18-aosc-os-relnote.md
```
12 changes: 7 additions & 5 deletions components/CategoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ const props = defineProps<{
}>();

const { data, error, status } = await useAsyncData(
computed(
() =>
`${locale.value}:CategoryList:${props.category}:${props.limit}:${props.filters?.map((obj) => `${obj.key}-${obj.value}`).join('--')}`
),
queryCollectionCategory(props.category, props.limit, props.filters)
`${locale.value}:CategoryList:${props.category}:${props.limit}:${props.filters?.map((obj) => `${obj.key}-${obj.value}`).join('--')}`,
queryCollectionCategory(
locale.value,
props.category,
props.limit,
props.filters
)
);
</script>

Expand Down
12 changes: 7 additions & 5 deletions components/CommonContent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { textContent } from 'minimark'; // Nuxt Content v3 依赖
import { useScrollStore } from '~/stores/scroll';
import { queryCollectionLocale } from '~/utils/content';

const props = defineProps<{ path?: string }>();

Expand All @@ -12,24 +13,25 @@ const contentRef = useTemplateRef('contentRef');
const contentPath = computed(() => {
if (props.path) return props.path;

// For `prefix_except_default`
// `prefix_except_default` 会移除默认语言的 URL 路径前缀
// 但是请求时使用的路径对应文件夹路径,都有前缀
const prefix = `/${locale.value}`;
return route.path.startsWith(prefix)
? route.path.substring(prefix.length) || '/'
: route.path;
});

const { data: page, error } = await useAsyncData(
computed(() => `${locale.value}:${contentPath.value}`),
`${locale.value}:CommonContent:${contentPath.value}`,
async () => {
let content = await queryCollection(locale.value)
let content = await queryCollectionLocale(locale.value)
.path(contentPath.value)
.first();

// 如果当前语言下没有对应文件就试试用默认语言的
let fallback = false;
if (!content && locale.value !== defaultLocale) {
content = await queryCollection(defaultLocale)
content = await queryCollectionLocale(defaultLocale)
.path(contentPath.value)
.first();

Expand All @@ -38,7 +40,7 @@ const { data: page, error } = await useAsyncData(

if (!content)
throw createError({
statusMessage: 'Query Content Failed',
statusMessage: 'Query content failed',
data: {
query: { locale: locale.value, path: contentPath.value },
fallback: fallback
Expand Down
4 changes: 2 additions & 2 deletions components/app/AppShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ defineProps({
v-for="(item, index) in title.texts"
:key="`${title.texts[0]}-${index}`">
<span v-if="title.book.includes(index)">
<span v-if="locale === 'zh'">《{{ item }}》</span>
<span v-else-if="locale === 'en'">
<span v-if="locale === 'zh-cn'">《{{ item }}》</span>
<span v-else-if="locale === 'en-us'">
<i>{{ item }}</i>
</span>
</span>
Expand Down
42 changes: 22 additions & 20 deletions content.config.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import { defineCollection, defineContentConfig, z } from '@nuxt/content';
import type { DefinedCollection } from '@nuxt/content';
import { nuxtI18nLocales, i18nCodeToContent } from './i18n/config';
import type { NuxtI18nCode, NuxtI18nContentCode } from './i18n/config';

const newsSchema = z.object({
const pageSchama = z.object({
title: z.string(),
date: z.date(),
categories: z.array(z.string()),
important: z.optional(z.boolean()),
home: z.optional(z.boolean())
});

const definePageCollection = (locale: NuxtI18nCode) =>
defineCollection({
source: {
include: `${locale}/**`,
prefix: '/', // prefixes are handled by @nuxtjs/i18n
exclude: ['**/_*']
},
type: 'page',
schema: pageSchama
});

export default defineContentConfig({
collections: {
zh: defineCollection({
source: {
include: 'zh/**',
prefix: '/', // prefixes handled by @nuxtjs/i18n
exclude: ['**/_*']
},
type: 'page',
schema: newsSchema
}),
en: defineCollection({
source: {
include: 'en/**',
prefix: '/',
exclude: ['**/_*']
},
type: 'page',
schema: newsSchema
}),
...Object.fromEntries(
nuxtI18nLocales.map((locale) => [
i18nCodeToContent(locale.code),
definePageCollection(locale.code)
])
),
gallery: defineCollection({
source: 'all/gallery.yml',
type: 'data',
Expand All @@ -42,5 +44,5 @@ export default defineContentConfig({
)
})
})
}
} as { [key in NuxtI18nContentCode | 'gallery']: DefinedCollection }
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Photographs and blog posts

Friends of our community have kindly taken some nice photographs during AOSCC, and they are listed below:

- A photo gallery from our [Community](/en) page.
- A photo gallery from our [Community](/en-us) page.
- From ホロ's blog:
- [Day 1](https://blog.yoitsu.moe/aosc/aoscc_2016.html)
- [Day 2](https://blog.yoitsu.moe/aosc/aoscc_2016_2.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ title: AOSC OS Base and BuildKit Tarball Updates
---


Tarballs for AOSC OS Base (bare-metal variant) and BuildKit (packaging/development variant) are updated yesterday for all supported architectures - you may now obtain them via the ["GET AOSC OS"](/en/download#aosc-os-download) link above.
Tarballs for AOSC OS Base (bare-metal variant) and BuildKit (packaging/development variant) are updated yesterday for all supported architectures - you may now obtain them via the ["GET AOSC OS"](/en-us/download#aosc-os-download) link above.

Significant changes to the tarballs include:

- AOSC OS Core version of these tarballs have been updated to [4.0.1](/en/news/2016-09-24-core-401-released) (you might also want to check out the release announcement of [4.0.0](/en/news/2016-09-18-aosc-os-core-4-is-green)).
- AOSC OS Core version of these tarballs have been updated to [4.0.1](/en-us/news/2016-09-24-core-401-released) (you might also want to check out the release announcement of [4.0.0](/en-us/news/2016-09-18-aosc-os-core-4-is-green)).
- ARM64 tarballs for Base and BuildKit are now ready for use, and the "Experimental" notes are removed.

Some changes to the "GET AOSC OS" page were made as well:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Take this example of our MATE release, as you can see:

It now comes with all the appearance customization mentioned above, in addition to bluetooth connectivity support - powered by Blueberry from the [Linux Mint Project](https://github.com/linuxmint/blueberry) - everything should function out of the box, so you can jump right into work and entertainment.

You may now head over to our [Download](/en/download#aosc-os-download) section to get the new system releases, or simply update your existing installation.
You may now head over to our [Download](/en-us/download#aosc-os-download) section to get the new system releases, or simply update your existing installation.


### Known issues:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Allwinner images available!
---


Our ARM/SunXi guru Icenowy Zheng has just released a big batch of system images for ARMv7-based Allwinner boards and tablets. The images are based on the "Base" variant of AOSC OS releases and they can now be obtained in the respective section in the [Download](/en/download#aosc-os-download) page.
Our ARM/SunXi guru Icenowy Zheng has just released a big batch of system images for ARMv7-based Allwinner boards and tablets. The images are based on the "Base" variant of AOSC OS releases and they can now be obtained in the respective section in the [Download](/en-us/download#aosc-os-download) page.

<!-- ![icenowy-opi1](/assets/news/opi1.jpg) -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Raspberry Pi images available!
---


Shortly after the release of Allwinner AOSC OS images, the image for Raspberry Pi 2/3 is now available as well. The image is based on the "Base" variant of AOSC OS releases and they can now be obtained in the respective section in the [Download](/en/download#aosc-os-download) page.
Shortly after the release of Allwinner AOSC OS images, the image for Raspberry Pi 2/3 is now available as well. The image is based on the "Base" variant of AOSC OS releases and they can now be obtained in the respective section in the [Download](/en-us/download#aosc-os-download) page.

Note that currently the image is based on ARMv7 (therefore 32-bit) userspace, as the official kernel that Raspberry Pi supplies (BSP) is ARMv6/ARMv7 only. We will be releasing separate images for Raspberry Pi 3 soon, as mainline Kernel support will land for this particular board.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Winter Distribution Updates (and Looking Ahead)!
---


You might have already noticed by looking at the [Downloads](/en/download#aosc-os-download) page that we have expanded our line-up of releases (again). The winter distribution updates is a major update to our AOSC OS releases, and it packs a lot more than just software updates:
You might have already noticed by looking at the [Downloads](/en-us/download#aosc-os-download) page that we have expanded our line-up of releases (again). The winter distribution updates is a major update to our AOSC OS releases, and it packs a lot more than just software updates:

- Cinnamon and LXDE are added as new variants.
- SD/eMMC images based on the "Base" variant are now available for ARM devices (Raspberry Pi and Allwinner).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ To enroll your device, run the following series of commands as `root` (just copy

echo deb http://repo.aosc.io/os-armel/sunxi/os3-dpkg / > /etc/apt/sources.list.d/10-sunxi.list && apt update && apt dist-upgrade -y && apt install aosc-os-armel-sunxi-boot aosc-os-arm-boot-flasher -y && FLASHER_CAPABILITIES='bootloader kernel' aosc-arm-flasher

New images are now available in the [Downloads](/en/download#aosc-os/) page.
New images are now available in the [Downloads](/en-us/download#aosc-os/) page.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ title: 'Progress Report: AOSC OS, "Meltdown" and "Spectre"'
Since our last [progress report](https://aosc.io/news/1115-core-511-meltdown-and-spectre), the following progress has been accomplished in our effort to mitigate the "Meltdown" and "Spectre" vulnerabilities for our users:

- Browsers. With the recently released WebKit2GTK+ 2.18.5, which addressed ["Spectre"-related issues](https://webkitgtk.org/security/WSA-2018-0001.html) - at the present moment, it should be safe to use browsers and applications based on this engine: Midori, Epiphany (GNOME Web), Yelp (GNOME Help/Manual Browser), etc.
- Microcode. Intel has released version 20180108 of their Microcode update package to further the mitigation of both vulnerabilities. However, there are reports announced by [Lenovo](https://pcsupport.lenovo.com/us/en/product_security/ps500151) and [Intel](https://newsroom.intel.com/news/intel-security-issue-update-addressing-reboot-issues/) regarding the update resulting in unexpected reboots. Please notify us if you encountered such issue.
- Microcode. Intel has released version 20180108 of their Microcode update package to further the mitigation of both vulnerabilities. However, there are reports announced by [Lenovo](https://pcsupport.lenovo.com/us/en-us/product_security/ps500151) and [Intel](https://newsroom.intel.com/news/intel-security-issue-update-addressing-reboot-issues/) regarding the update resulting in unexpected reboots. Please notify us if you encountered such issue.
- Applications. Wireshark has recently released version 2.4.4 which mitigated one of the variants of "Spectre", Kernel-Side Attack.

Please update your AOSC OS as soon as possible.

— Mingcong Bai
— Mingcong Bai
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ eventually worsened to the point that it was practically impossible to even
complete elements of the original design (distribution downloads), let alone
for new features to be implemented.

Therefore, with the help from [@liushuyu](/en), a new design was
Therefore, with the help from [@liushuyu](/en-us), a new design was
made with minimalism in mind, and it is already
[better documented](https://wiki.aosc.io/developer/infrastructure/-portal) than
the last. It might look simple and plain, but it loads extremely fast, and is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Therefore, with this batch of AMD64 (x86_64) tarballs (in partcular, those bundl
- NVIDIA 390.* (`aosc-os_${variant}+nvidia390_${date}.tar.xz`): For NVIDIA GeForce 400 series (GT400, GTX400, etc.) series, their equivalent Quadro series, and above.
- NVIDIA 340.* (`aosc-os_${variant}+nvidia340_${date}.tar.xz`): For NVIDIA GeForce 8000 series, their equivalent Quadro series, and above.

For a full list of devices supported by the aforementioned NVIDIA Unix Driver series, please refer to their [Unix Drivers](https://www.nvidia.com/en/drivers/unix/) page.
For a full list of devices supported by the aforementioned NVIDIA Unix Driver series, please refer to their [Unix Drivers](https://www.nvidia.com/en-us/drivers/unix/) page.

_Note: By downloading AOSC OS preloaded with proprietary NVIDIA Unix Drivers (variants suffixed with +nvidia, +nvidia340, or +nvidia+390), you agree to the [LICENSE FOR CUSTOMER USE OF NVIDIA GEFORCE SOFTWARE](https://www.nvidia.com/en/drivers/geforce-license/), also enclosed within the relevant AOSC OS distributions._
_Note: By downloading AOSC OS preloaded with proprietary NVIDIA Unix Drivers (variants suffixed with +nvidia, +nvidia340, or +nvidia+390), you agree to the [LICENSE FOR CUSTOMER USE OF NVIDIA GEFORCE SOFTWARE](https://www.nvidia.com/en-us/drivers/geforce-license/), also enclosed within the relevant AOSC OS distributions._

Automated Tarball Generation
----------------------------
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading