0
0

Use npm + Fixed robots.txt

This commit is contained in:
Opnxng 2023-11-07 07:40:08 +08:00
parent e2c11c67ff
commit 189da63e93
5 changed files with 4737 additions and 573 deletions

View File

@ -38,7 +38,7 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addFilter("readablePostDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, {
zone: "Asia/Hong_Kong",
zone: "Asia/Singapore",
}).setLocale('en-GB').toLocaleString({day: 'numeric',month: 'short',year: 'numeric'});
});

View File

@ -2,8 +2,34 @@
The source code of [about.opnxng.com](https://about.opnxng.com), powered by [Eleventy](https://github.com/11ty/eleventy).
## Credits
[EB Garamond](http://www.georgduffner.at/ebgaramond/), a FOSS typeface designed by Georg Mayr-Duffner, is used for the drop caps. It is available on [Github](https://github.com/georgd/EB-Garamond).
[Heldane Text](https://klim.co.nz/blog/heldane-design-information/), another Garalde designed by Kris Sowersby, is used for the body text.
The site used the [reset styles](http://meyerweb.com/eric/tools/css/reset/) by Eric A. Meyer and the [SVG Favicons generator](https://github.com/shun-shobon/favicon-generator) by Shuntaro Nishizawa.
## Usage
```
# Initialize
docker run --rm --name=npm -u 1000 -v /path/to/website:/app -w /app node:lts-slim npm init -y
# Install node modules
docker run --rm --name=npm -u 1000 -v /path/to/website:/app -w /app node:lts-slim npm install \
npm \
@11ty/eleventy \
luxon \
html-minifier \
clean-css \
markdown-it-attrs \
markdown-it-bracketed-spans
```
```
# Generate website
docker run --rm --name=npm -u 1000 -v /path/to/website:/app -w /app node:lts-slim npx eleventy
```
```
# Update
docker run --rm --name=npm -u 1000 -v /path/to/website:/app -w /app node:lts-slim npm update
```

5271
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,11 @@
{
"dependencies": {
"clean-css": "^5.2.0",
"@11ty/eleventy": "^2.0.1",
"clean-css": "^5.3.2",
"html-minifier": "^4.0.0",
"html-minify": "^0.3.2",
"luxon": "^2.3.0",
"markdown-it-attrs": "^4.1.4",
"markdown-it-bracketed-spans": "^1.0.1"
"markdown-it-bracketed-spans": "^1.0.1",
"npm": "^10.2.3"
}
}

View File

@ -1,2 +1,2 @@
User-Agent: *
Disallow: /
Allow: /