Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

14 changes: 12 additions & 2 deletions .github/workflows/node.js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 15.x]
os: [ubuntu-latest, windows-latest]
node-version: [14.x]

steps:
- uses: actions/checkout@v2

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand All @@ -46,3 +52,7 @@ jobs:

- name: Build production website
run: npm run build

- name: Deploy to wt.szp.io
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x' }}
run: rsync -avz --delete public/ sun@tillycode.com:/srv/http/tillycode/
17 changes: 0 additions & 17 deletions .github/workflows/readme.yml

This file was deleted.

127 changes: 13 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,24 @@
<p align="center">
<a href="https://getdoks.org/">
<img alt="Doks" src="https://doks.netlify.app/doks.svg" width="60">
</a>
</p>
# tilly-site

<h1 align="center">
Doks
</h1>
[![Hyas CI](https://github.com/sunziping2016/tilly-site/actions/workflows/node.js-ci.yml/badge.svg)](https://github.com/sunziping2016/tilly-site/actions/workflows/node.js-ci.yml)

<h3 align="center">
Modern documentation theme
</h3>
这是用于记录tilly开发文档的网站。

<p align="center">
Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default.
</p>
## 如何开发

<p align="center">
<a href="https://github.com/h-enk/doks/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/h-enk/doks?style=flat-square" alt="GitHub">
</a>
<a href="https://github.com/h-enk/doks/releases">
<img src="https://img.shields.io/github/v/release/h-enk/doks?include_prereleases&style=flat-square"alt="GitHub release (latest SemVer including pre-releases)">
</a>
<a href="https://github.com/h-enk/doks/actions?query=workflow%3A%22Hyas+CI%22">
<img src="https://img.shields.io/github/workflow/status/h-enk/doks/Hyas%20CI/master?style=flat-square" alt="GitHub Workflow Status (branch)">
</a>
<a href="https://app.netlify.com/sites/doks/deploys">
<img src="https://img.shields.io/netlify/895a161c-86be-48a2-8c57-a8c5d68cd1a4?style=flat-square" alt="Netlify">
</a>
</p>

![Doks — Modern Documentation Theme](https://raw.githubusercontent.com/h-enk/doks/master/images/tn.png)

## Demo

- [doks.netlify.app](https://doks.netlify.app/)

## Why Doks?

Nine reasons why you should use Doks:

1. __Security aware__. Get A+ scores on [Mozilla Observatory](https://observatory.mozilla.org/analyze/doks.netlify.app) out of the box. Easily change the default Security Headers to suit your needs.

2. __Fast by default__. Get 100 scores on [Google Lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=7731347bb8ce999eff7428a8e763b637) by default. Doks removes unused css, prefetches links, and lazy loads images.

3. __SEO-ready__. Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.

4. __Development tools__. Code with confidence. Check styles, scripts, and markdown for errors and fix automatically or manually.

5. __Bootstrap framework__. Build robust, flexible, and intuitive websites with Bootstrap 5. Easily customize your Doks site with the source Sass files.

6. __Netlify-ready__. Deploy to Netlify with sensible defaults. Easily use Netlify Functions, Netlify Redirects, and Netlify Headers.

7. __Full text search__. Search your Doks site with FlexSearch. Easily customize index settings and search options to your liking.

8. __Page layouts__. Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.

9. __Dark mode__. Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.

## Requirements

Doks uses npm to centralize dependency management, making it [easy to update](https://getdoks.org/docs/help/how-to-update/) resources, build tooling, plugins, and build scripts:

- Download and install [Node.js](https://nodejs.org/) (it includes npm) for your platform.

## Get started

Start a new Doks project in three steps:

### 1. Create a new site

Doks is available as a child theme, and a starter theme:

- Use the Doks child theme, if you do __not__ plan to customize a lot, and/or need future Doks updates.
- Use the Doks starter theme, if you plan to customize a lot, and/or do __not__ need future Doks updates.

Not quite sure? Use the Doks child theme.

#### Doks child theme

```bash
git clone https://github.com/h-enk/doks-child-theme.git my-doks-site && cd my-doks-site
```

#### Doks starter theme

```bash
git clone https://github.com/h-enk/doks.git my-doks-site && cd my-doks-site
```

### 2. Install dependencies
### 搭建开发环境

```bash
# Clone项目
git clone git@github.com:aaaawt/sweetszp.git
# 安装依赖
npm install
# 开发博客(会根据你的更改即使地显示在本地网页上)
npm start
```

### 3. Start development server
### 新建文章

```bash
npm run start
```

## Other commands

Doks comes with [commands](https://getdoks.org/docs/prologue/commands/) for common tasks.

## Documentation

- [Netlify](https://docs.netlify.com/)
- [Hugo](https://gohugo.io/documentation/)
- [Doks](https://getdoks.org/)

## Communities

- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
- [Doks Discussions](https://github.com/h-enk/doks/discussions)

## Blog
<!--START_SECTION:feed-->
* [Doks v0.2](https:&#x2F;&#x2F;getdoks.org&#x2F;blog&#x2F;doks-v0.2&#x2F;)
* [Say hello to Doks 👋](https:&#x2F;&#x2F;getdoks.org&#x2F;blog&#x2F;say-hello-to-doks&#x2F;)
<!--END_SECTION:feed-->
npm run create docs/some-interesting-title/index.md
```
4 changes: 4 additions & 0 deletions assets/js/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import htmlbars from 'highlight.js/lib/languages/htmlbars';
import ini from 'highlight.js/lib/languages/ini';
import yaml from 'highlight.js/lib/languages/yaml';
import markdown from 'highlight.js/lib/languages/markdown';
import c from 'highlight.js/lib/languages/c';
import fortran from 'highlight.js/lib/languages/fortran';

hljs.registerLanguage('javascript', javascript);
hljs.registerLanguage('json', json);
Expand All @@ -16,6 +18,8 @@ hljs.registerLanguage('ini', ini);
hljs.registerLanguage('toml', ini);
hljs.registerLanguage('yaml', yaml);
hljs.registerLanguage('md', markdown);
hljs.registerLanguage('c', c);
hljs.registerLanguage('fortran', fortran);

document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('pre code').forEach((block) => {
Expand Down
4 changes: 4 additions & 0 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Source:
'description',
],
},
encode: false,
tokenize: function(str){
return str.replace(/[\x00-\x7F]/g, "").split("");
}
});

var docs = [
Expand Down
2 changes: 0 additions & 2 deletions assets/js/katex.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ document.addEventListener('DOMContentLoaded', function() {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true},
],
});
});
1 change: 1 addition & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import "common/fonts";
@import "common/global";
@import "common/dark";
@import "common/counter";
@import "components/doks";
// @import "components/syntax";
@import "components/code";
Expand Down
43 changes: 43 additions & 0 deletions assets/scss/common/_counter.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
article.blog-content,
main.docs-content {
counter-reset: figure-counter h2-counter h3-counter h4-counter equation;

h2::before {
counter-increment: h2-counter;
counter-set: h3-counter h4-counter;
content: counter(h2-counter) " ";
}

h3::before {
counter-increment: h3-counter;
counter-set: h4-counter;
content: counter(h2-counter) "." counter(h3-counter) " ";
}

h4::before {
counter-increment: h4-counter;
content: counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) " ";
}

figure {
display: flex;
flex-direction: column;
align-items: center;
}

& > figure {
counter-increment: figure-counter;
counter-set: subfigure-counter;

& > figcaption::before {
content: "图 " counter(figure-counter) ":";
font-weight: bold;
}
}

figure figure > figcaption::before {
counter-increment: subfigure-counter;
content: "图 " counter(figure-counter) " (" counter(subfigure-counter, lower-alpha) "):";
font-weight: bold;
}
}
6 changes: 3 additions & 3 deletions assets/scss/components/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ code {
padding: 0.25rem 0.5rem;
}

pre {
pre:not(.chroma) {
margin: 2rem 0;
}

Expand All @@ -27,7 +27,7 @@ pre code {
scrollbar-color: transparent transparent;
}

.hljs {
:not(.chroma) > .hljs {
padding: 1.25rem 1.5rem;
}

Expand All @@ -39,7 +39,7 @@ pre code {
border-radius: 0;
}

pre {
pre:not(.chroma) {
margin: 2rem -1.5rem;
}
}
Expand Down
11 changes: 11 additions & 0 deletions assets/scss/components/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
table {
overflow-x: auto;
display: block;
}

table:not(.lntable) {
@extend .table;

margin: 3rem 0;
}

table.lntable {
td:nth-child(2) {
width: 100%;
}
}
Loading