From 976d1ea82a0faef4a3337486693f09e6fcb40817 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 10 Jan 2024 15:31:02 +0800 Subject: [PATCH] :memo: Chore: remove the docs Git submodule and add the demo directory (resolve #404) --- .gitmodules | 3 -- demo/content/posts/first_post.md | 7 ++++ demo/hugo.toml | 55 ++++++++++++++++++++++++++++++++ demo/themes/FixIt | 1 + docs | 1 - hugo.toml | 4 +-- package.json | 5 ++- vercel.json | 12 ------- 8 files changed, 67 insertions(+), 21 deletions(-) delete mode 100644 .gitmodules create mode 100644 demo/content/posts/first_post.md create mode 100644 demo/hugo.toml create mode 120000 demo/themes/FixIt delete mode 160000 docs delete mode 100644 vercel.json diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 55356b0d..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "docs"] - path = docs - url = https://github.com/hugo-fixit/docs.git diff --git a/demo/content/posts/first_post.md b/demo/content/posts/first_post.md new file mode 100644 index 00000000..27c150a7 --- /dev/null +++ b/demo/content/posts/first_post.md @@ -0,0 +1,7 @@ +--- +title: My First Post +date: 2023-02-20T20:14:22+08:00 +draft: false +--- + +A blog (a truncation of "weblog") is an informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in reverse chronological order so that the most recent post appears first, at the top of the web page. Until 2009, blogs were usually the work of a single individual,[citation needed] occasionally of a small group, and often covered a single subject or topic. In the 2010s, "multi-author blogs" (MABs) emerged, featuring the writing of multiple authors and sometimes professionally edited. MABs from newspapers, other media outlets, universities, think tanks, advocacy groups, and similar institutions account for an increasing quantity of blog traffic. The rise of Twitter and other "microblogging" systems helps integrate MABs and single-author blogs into the news media. Blog can also be used as a verb, meaning to maintain or add content to a blog. diff --git a/demo/hugo.toml b/demo/hugo.toml new file mode 100644 index 00000000..67545ecc --- /dev/null +++ b/demo/hugo.toml @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------------- +# The following is a necessary configuration for the FixIt theme. +# ------------------------------------------------------------------------------------- + +title = "My Hugo FixIt Site" +baseURL = "http://example.org/" +# Change the default theme to be use when building the site with Hugo +theme = "FixIt" + +[markup] + # Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting) + [markup.highlight] + ########## necessary configurations ########## + # https://github.com/hugo-fixit/FixIt/issues/43 + codeFences = true + lineNos = true + lineNumbersInTable = true + noClasses = false + ########## necessary configurations ########## + guessSyntax = true + # Goldmark is from Hugo 0.60 the default library used for Markdown + [markup.goldmark] + [markup.goldmark.extensions] + definitionList = true + footnote = true + linkify = true + strikethrough = true + table = true + taskList = true + typographer = true + [markup.goldmark.renderer] + # whether to use HTML tags directly in the document + unsafe = true + # Table Of Contents settings + [markup.tableOfContents] + ordered = false + startLevel = 2 + endLevel = 6 + +[outputs] + home = ["HTML", "RSS", "JSON", "archives"] + page = ["HTML", "MarkDown"] + section = ["HTML", "RSS"] + taxonomy = ["HTML"] + term = ["HTML", "RSS"] + +# ------------------------------------------------------------------------------------- +# Theme Core Configuration +# See: https://fixit.lruihao.cn/documentation/basics/#theme-configuration +# ------------------------------------------------------------------------------------- + +[params] + # FixIt theme version + version = "0.3.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. + # ... diff --git a/demo/themes/FixIt b/demo/themes/FixIt new file mode 120000 index 00000000..c25bddb6 --- /dev/null +++ b/demo/themes/FixIt @@ -0,0 +1 @@ +../.. \ No newline at end of file diff --git a/docs b/docs deleted file mode 160000 index c169d92d..00000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c169d92d9428e380f7f6b8f2440e02e0d8991a28 diff --git a/hugo.toml b/hugo.toml index 91582294..19cf4d58 100644 --- a/hugo.toml +++ b/hugo.toml @@ -263,7 +263,7 @@ enableEmoji = true # taxonomy: ["HTML", "RSS"] # term: ["HTML", "RSS"] [outputs] - home = ["HTML", "RSS", "JSON", "archives", "offline"] + home = ["HTML", "RSS", "JSON", "archives"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML"] @@ -286,7 +286,7 @@ enableEmoji = true [params] # FixIt 0.2.15 | CHANGED FixIt theme version - version = "0.2.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. + version = "0.3.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. # site description description = "" # site keywords diff --git a/package.json b/package.json index 98a908e0..c8a8b0aa 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,9 @@ "author": "Lruihao (https://lruihao.cn)", "scripts": { "algolia": "atomic-algolia", - "build": "hugo -v --source=docs --gc --minify", - "server": "hugo server --source=docs -D --disableFastRender --navigateToChanged --ignoreCache --bind 0.0.0.0", + "build": "hugo -v --source=demo --gc --minify", + "server": "hugo server --source=demo -D --disableFastRender --navigateToChanged --ignoreCache --bind 0.0.0.0", "server:production": "npm run server -- -e production", - "update:docs": "git submodule update --remote --merge && git add docs && git commit -m ':memo: Docs: update theme docs'", "version": "sed -i '' \"s/v$npm_package_version-RC/v$npm_package_version/g\" layouts/partials/init/index.html && git add .", "postversion": "git push && git push --tags" }, diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 59738556..00000000 --- a/vercel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "routes": [ - { - "handle": "filesystem" - }, - { - "src": "/zh-cn/(.*)", - "status": 404, - "dest": "/zh-cn/404.html" - } - ] -} \ No newline at end of file