Skip to content

Commit

Permalink
Merge pull request #23 from shandianchengzi/patch-2
Browse files Browse the repository at this point in the history
给markdown最后自动添加译者信息
  • Loading branch information
mudongliang authored Apr 5, 2024
2 parents ccc3e92 + 2bc16e2 commit e661073
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 32 deletions.
8 changes: 8 additions & 0 deletions pages/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ const blog = defineCollection({
[z.date(), z.string(), z.number()]
).default(""),
link: z.string().url().default(""),
proofreader: z.string().default(SITE.author),
proofread_date: z.union(
[z.date(), z.string(), z.number()]
).default(""),
publisher: z.string().default(SITE.author),
published_date: z.union(
[z.date(), z.string(), z.number()]
).default(""),
}),
});

Expand Down
32 changes: 30 additions & 2 deletions pages/src/layouts/PostDetails.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface Props {
const { post } = Astro.props;
const { title, author } = post.data;
const { title, author, collected_date, collector, translated_date, translator, link, proofreader, proofread_date, publisher, published_date } = post.data;
const { Content } = await post.render();
Expand Down Expand Up @@ -60,6 +60,34 @@ const layoutProps = {
<!-- /> -->
<article id="article" role="article" class="prose mx-auto mt-8 max-w-3xl">
<Content />
<hr>
<div>
<p><strong>{!translated_date ? "原文链接:": "译自:"}</strong> <a href={link}>{link}</a></p>
<p>
<strong>选题:</strong>
<a href={"https://github/" + collector}>{collector}</a>
{translated_date && (
<span>
&nbsp;&nbsp;
<strong>译者:</strong>
<a href={"https://github/" + translator}>{translator}</a>
{proofread_date && (
<span>
&nbsp;&nbsp;
<strong>校对:</strong><a href={"https://github/" + proofreader}>{proofreader}</a>
</span>
)}
{published_date && (
<span>
&nbsp;&nbsp;
<strong>发布:</strong><a href={"https://github/" + publisher}>{publisher}</a>
</span>
)}
</span>
)}
</p>
<p>本文{!translated_date && ""}由 <a href="https://gitee.com/hust-open-atom-club/translate-project">HCTT 翻译团队</a> 原创翻译,<a href="https://gitee.com/hust-open-atom-club">华中科技大学开放原子开源俱乐部</a>荣誉推出。</p>
</div>
</article>

<!-- <ul class="my-8"> -->
Expand All @@ -68,7 +96,7 @@ const layoutProps = {

<div
class="my-8 flex flex-col-reverse items-center justify-between gap-6 sm:flex-row-reverse sm:items-end sm:gap-4"
>
>
<button
id="back-to-top"
class="focus-outline whitespace-nowrap py-1 hover:opacity-75"
Expand Down
8 changes: 0 additions & 8 deletions sources/general/20240223 linux is a CNA.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,3 @@ CVE 组织[最近宣布](https://www.cve.org/Media/News/item/news/2024/02/13/ker
您可以在此[邮件列表](https://lore.kernel.org/linux-cve-announce/)上找到我们分配的所有 CVE,并且如果您希望自动收到所有 CVE 的通知,请订阅该列表。可以在[此处](https://git.kernel.org/pub/scm/linux/security/vulns.git/)找到它们的 git 存储库,但请注意,随着时间的推移,存储库的结构会发生变化,因为我们在学习和管理流程方面会变得更加完善,所以暂时不要认为 git 树中的任何内容会固定不变。

一旦流程正常运转并且能够顺利分配 CVE,我会在未来写更多内容。这一公告只是第一步,它使我们成为了 Linux CVE 分配流程的管理者。

___

译自:<http://www.kroah.com/log/blog/2024/02/13/linux-is-a-cna/>

译者:[sun-yu-777](https://gitee.com/sun-yu-777) 校对:[mudongliang](https://gitee.com/mudongliang)

本文由[HCTT](https://gitee.com/hust-open-atom-club/translate-project)原创翻译,[华科开放原子俱乐部](https://gitee.com/hust-open-atom-club)荣誉推出。
8 changes: 0 additions & 8 deletions sources/kernel/20240220 linux kernel CVE assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,3 @@ Linux内核中未修复的安全问题不会自动分配CVE;只有在安全修
简而言之,我们不知道您的用例,也不知道您使用的是内核的哪个部分,因此我们无法确定特定的CVE是否与您的系统相关。

与往常一样,最好采取所有发布的内核更改,因为它们是由许多社区成员在一个统一的整体中一起进行测试的,而不是作为个别的精选更改。还要注意,对于许多bug来说,整体问题的解决方案并不是在单个更改中找到的,而是在彼此之上的许多修复的总和。理想情况下,CVEs将被分配给所有问题的所有修复,但有时我们将无法注意到一些修复,因此某些修复可能在没有CVE的情况下被采取。

___

译自:<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/cve.rst>

译者:[yanruo](https://gitee.com/kyanruo) 校对:[mudongliang](https://gitee.com/mudongliang)

本文由[HCTT](https://gitee.com/hust-open-atom-club/translate-project)原创翻译,[华科开放原子俱乐部](https://gitee.com/hust-open-atom-club)荣誉推出。
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,3 @@ GCC 自 4.9.x \[[1](https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Optio
UBSAN_SANITIZE := n

未对齐的内存访问检测由单独的选项 CONFIG_UBSAN_ALIGNMENT 控制。在支持非对齐访问(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y)的架构上,该选项默认关闭,但仍可在配置中启用,只是要注意这会产生大量 UBSAN 报告。

---
译自:<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/dev-tools/ubsan.rst>

译者:[dzm91_hust](https://gitee.com/dzm91_hust) 校对:[hustsjy](https://gitee.com/hustsjy)

本文由[HCTT](https://gitee.com/hust-open-atom-club/translate-project)原创翻译,[华科开放原子俱乐部](https://gitee.com/hust-open-atom-club)荣誉推出。
7 changes: 0 additions & 7 deletions sources/syzkaller/executing_syzkaller_programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,3 @@ scp -P 10022 -i bullseye.img.key bin/linux_amd64/syz-execprog bin/linux_amd64/sy
# {Threaded:true Repeat:true RepeatTimes:0 Procs:8 Slowdown:1 Sandbox:none Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true UseTmpDir:true HandleSegv:true Repro:false Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}
```
你需要基于文件头中的值调整对应的参数。其中,`Threaded`/`Procs`/`Sandbox``-threaded`/`-procs`/`-sandbox` 参数对应。如果 `Repeat` 的值为 `true`,则在 `syz-execprog` 的参数中添加 `-repeat=0`

---
译自:<https://github.com/google/syzkaller/blob/master/docs/executing_syzkaller_programs.md>

译者:[tttturtle-russ](https://gitee.com/tttturtle-russ) 校对:[dzm91_hust](https://gitee.com/dzm91_hust)

本文由[HCTT](https://gitee.com/hust-open-atom-club/translate-project)原创翻译,[华科开放原子俱乐部](https://gitee.com/hust-open-atom-club)荣誉推出。

0 comments on commit e661073

Please sign in to comment.