Xi Ruoyao 2 роки тому
батько
коміт
cc4bb9f4d6

+ 0 - 57
config/_default/config.toml

@@ -1,57 +0,0 @@
-baseurl = "https://bf.mengyan1223.wang/blog/"  # End your URL with a `/` trailing slash, e.g. `https://example.com/`.
-title = "Xry111's Blog"
-theme = "wowchemy"
-enableEmoji = true
-footnotereturnlinkcontents = "<sup>^</sup>"
-ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
-preserveTaxonomyNames = true
-paginate = 10
-
-# Enable analytics by entering your Google Analytics tracking ID
-googleAnalytics = ""
-
-# Default language to use (if you setup multilingual support)
-defaultContentLanguage = "en"
-hasCJKLanguage = true
-defaultContentLanguageInSubdir = false
-
-enableGitInfo = true
-
-[outputs]
-  home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
-  section = [ "HTML", "RSS" ]
-
-[mediaTypes."application/manifest+json"]
-  suffixes = ["webmanifest"]
-
-[outputFormats.WebAppManifest]
-  mediaType = "application/manifest+json"
-  rel = "manifest"
-
-# Configure BlackFriday Markdown rendering.
-#   See: https://gohugo.io/readfiles/bfconfig/
-[blackfriday]
-  hrefTargetBlank = true  # `true` opens external links in a new tab.
-  fractions = true  # `false` disables smart fractions (e.g. 5/12 formatted as a fraction).
-  smartypants = true  # `false` disables all smart punctuation substitutions (e.g. smart quotes, dashes, fractions).
-
-menu_align_right = true
-
-# Taxonomies.
-[taxonomies]
-  tag = "tags"
-  category = "categories"
-  publication_type = "publication_types"
-  author = "authors"
-
-[module]
-  [[module.imports]]
-    path = "wowchemy/wowchemy"
-
-[markup]
-  [markup.goldmark]
-    [markup.goldmark.renderer]
-	  unsafe = true
-
-[security.funcs]
-  getenv = [ "^HUGO", "^WC" ]

+ 70 - 0
config/_default/config.yaml

@@ -0,0 +1,70 @@
+# Configuration of Hugo
+# Guide: https://wowchemy.com/docs/getting-started/
+# Hugo Documentation: https://gohugo.io/getting-started/configuration/#all-configuration-settings
+# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
+
+title: Xry111's Blog # Website name
+baseURL: 'https://bf.mengyan1223.wang/' # Website URL
+module:
+  imports:
+    path: wowchemy/wowchemy
+
+############################
+## LANGUAGE
+############################
+
+defaultContentLanguage: en
+hasCJKLanguage: true
+defaultContentLanguageInSubdir: false
+removePathAccents: true
+
+############################
+## MODULES
+############################
+
+############################
+## ADVANCED
+############################
+
+enableGitInfo: false
+summaryLength: 30
+paginate: 10
+enableEmoji: true
+enableRobotsTXT: true
+footnotereturnlinkcontents: <sup>^</sup>
+ignoreFiles: [\.ipynb$, .ipynb_checkpoints$, \.Rmd$, \.Rmarkdown$, _cache$]
+permalinks:
+  authors: '/author/:slug/'
+  tags: '/tag/:slug/'
+  categories: '/category/:slug/'
+disableAliases: true
+outputs:
+  home: [HTML, RSS, JSON, WebAppManifest]
+  section: [HTML, RSS]
+imaging:
+  resampleFilter: lanczos
+  quality: 75
+  anchor: smart
+timeout: 600000
+taxonomies:
+  tag: tags
+  category: categories
+  author: authors
+markup:
+  _merge: deep
+  goldmark:
+    renderer:
+      unsafe: true
+related:
+  threshold: 80
+  includeNewer: true
+  toLower: true
+  indices:
+    - name: tags
+      weight: 100
+    - name: categories
+      weight: 70
+security:
+  _merge: deep
+sitemap:
+  _merge: deep

+ 0 - 6
config/_default/languages.toml

@@ -1,6 +0,0 @@
-# Languages
-#   Create a [X] block for each language you want, where X is the language ID.
-
-# Configure the English version of the website.
-[en]
-  languageCode = "en-us"

+ 22 - 0
config/_default/languages.yaml

@@ -0,0 +1,22 @@
+# Languages
+#   Create a section for each of your site's languages.
+#   Documentation: https://wowchemy.com/docs/guide/language/
+
+# Default language
+en:
+  languageCode: en-us
+  # Uncomment for multi-lingual sites, and move English content into `en` sub-folder.
+  #contentDir: content/en
+
+# Uncomment the lines below to configure your website in a second language.
+#zh:
+#  languageCode: zh-Hans
+#  contentDir: content/zh
+#  title: Chinese website title...
+#  params:
+#    description: Site description in Chinese...
+#  menu:
+#    main:
+#      - name: 传
+#        url: '#about'
+#        weight: 1

+ 0 - 24
config/_default/menus.toml

@@ -1,24 +0,0 @@
-[[main]]
-  name = "Home"
-  url = "#about"
-  weight = 1
-
-[[main]]
-  name = "Publications"
-  url = "#publications"
-  weight = 2
-
-[[main]]
-  name = "Posts"
-  url = "#posts"
-  weight = 3
-
-[[main]]
-  name = "Projects"
-  url = "#projects"
-  weight = 4
-
-[[main]]
-  name = "Contact"
-  url = "#contact"
-  weight = 100

+ 21 - 0
config/_default/menus.yaml

@@ -0,0 +1,21 @@
+# Navigation Links
+#   To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
+  #     desired widget in your `content/home/` folder.
+  #   The weight parameter defines the order that the links will appear in.
+
+main:
+  - name: Home
+    url: '#about'
+    weight: 10
+  - name: Publications
+    url: '#publications'
+    weight: 20
+  - name: Posts
+    url: '#posts'
+    weight: 30
+  - name: Projects
+    url: '#projects'
+    weight: 40
+  - name: Contact
+    url: '#contact'
+    weight: 40

+ 0 - 143
config/_default/params.toml

@@ -1,143 +0,0 @@
-main_menu = {align = "r", show_logo = true}
-
-# Enable Keybase in Contact widget by entering your keybase.io username.
-keybase = ""
-
-# Discussion link (e.g. link to a forum, mailing list, or chat).
-#   Uncomment line below to use.
-#   discussion = { name = "Discuss", url = "https://discourse.gohugo.io" }
-
-# Diplay a logo in navigation bar rather than title (optional).
-#   To enable, place an image in `static/img/` and reference its filename below. To disable, set the value to "".
-logo = ""
-
-# Enable/disable map in Contact widget.
-# To show your address on a map in the contact widget, you need to enter your latitude, longitude and choose
-# a map provider below.
-# To use Google Maps, set `map = 1` and enter your API key that can be obtained here:
-#   https://developers.google.com/maps/documentation/javascript/get-api-key
-# To use OpenStreetMap tiles, set `map = 2`.
-# To use OpenStreetMap on a high traffic site, set `map = 3` and enter your API key that can be obtained here:
-#   https://www.mapbox.com/studio/account/tokens
-# To get your coordinates, right-click on Google Maps and choose "What's here?". The coords will show up at the bottom.
-#
-# Map provider:
-#   0: No map
-#   1: Google Maps
-#   2: OpenStreetMap (Mapnik)
-#   3: OpenStreetMap (Mapbox)
-
-# Date and time format (refer to Go's date format: http://fuckinggodateformat.com )
-#   Examples: "Mon, Jan 2, 2006" or "2006-01-02"
-date_format = "Jan 2, 2006"
-#   Examples: "3:04 pm" or "15:04"
-time_format = "3:04 PM"
-address_format = "en-us"
-
-# Show estimated reading time for posts?
-reading_time = true
-
-# Display comment count? Requires commenting to be enabled.
-comment_count = true
-
-# Display section pager for posts?
-section_pager = false
-
-# Link custom CSS and JS assets
-#   (relative to /static/css and /static/js respectively)
-custom_css = []
-custom_js  = []
-
-# Publication types.
-#   Used to categorize publications.
-#   The index of the publication type in the list is used as its unique numerical identifier.
-#   The numeric ID is used in a publication's frontmatter to categorize it.
-#   The language can be edited below.
-#   For multi-lingual sites, copy this block to each language section at the end of this file.
-publication_types = [
-'Uncategorized',  # 0
-'Conference proceedings',  # 1
-'Journal',  # 2
-'Work in progress',  # 3
-'Technical report',  # 4
-'Book',  # 5
-'Book chapter'  # 6
-]
-
-edit_page = {repo_url = "https://git.mengyan1223.wang/xry111/blog", repo_branch="master", editable = {}}
-
-[features]
-math = { enable = true }
-search = { provider = 'wowchemy' }
-
-# Configuration of talk pages.
-[talks]
-  # Show talk time?
-  time = true
-
-# Configuration of publication pages.
-[publications]
-  # Date format (refer to Go's date format: http://fuckinggodateformat.com )
-  #   Examples: "Mon, Jan 2, 2006" or "2006-01-02"
-  date_format = "January, 2006"
-
-# Configuration of project pages.
-[params.projects]
-  # List publications and talks related to the project?
-  list_children = true
-
-  # Publication list format.
-  #   0 = Simple
-  #   1 = Detailed
-  #   2 = APA
-  #   3 = MLA
-  publication_format = 3
-
-[search]
-  engine = 1
-
-[map]
-  engine = 0
-  map_api_key = ""
-  latitude = "37.4275"
-  longitude = "-122.1697"
-  zoom = 15
-
-[comments]
-  engine = 0
-  commentable = {}
-
-[avatar]
-  gravatar = false
-  shape = "circle"
-
-# Available address formats.
-[address_formats]
-  en-us = {order = ['street', 'city', 'region', 'postcode'], delimiters = [', ', ', ', ' ', '']}
-  en-gb = {order = ['street', 'city', 'region', 'postcode'], delimiters = [', ', ', ', ', ', '']}
-  de = {order = ['street', 'postcode', 'city'], delimiters = ['<br>', ' ', '']}
-  fr-fr = {order = ['street', 'postcode', 'city'], delimiters = ['<br>', ' ', '']}
-  zh = {order = ['postcode', 'region', 'city', 'street'], delimiters = [' ', ' ', ' ', '']}
-
-[cms]
-  # See https://sourcethemes.com/academic/docs/install/#install-with-web-browser
-  netlify_cms = false
-
-[appearance]
-  theme_day = 'minimal'
-  theme_night = 'minimal'
-  font = 'native'
-  font_size = 'L'
-
-[header.navbar]
-  align = 'r'
-  show_search = true
-
-[footer.copyright]
-  notice = 'Copyright (C) 2017-2022 Xi Ruoyao.  This work is licensed under {license}'
-
-[footer.copyright.license]
-enable = true
-allow_derivatives = false
-share_alike = false
-allow_commercial = false

+ 96 - 0
config/_default/params.yaml

@@ -0,0 +1,96 @@
+# SITE SETUP
+# Guide: https://wowchemy.com/docs/getting-started/
+# Documentation: https://wowchemy.com/docs/
+# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
+
+# Appearance
+
+appearance:
+  theme_day: minimal
+  theme_night: minimal
+  font: native
+  font_size: L
+
+# SEO
+
+marketing:
+  seo:
+    site_type: Person
+    local_business_type: ''
+    org_name: ''
+    description: "Xry111's Blog"
+    twitter: ''
+  analytics:
+    google_analytics: ''
+    baidu_tongji: ''
+  verification:
+    google: ''
+    baidu: ''
+
+# Site header
+
+header:
+  navbar:
+    enable: true
+    align: r
+    show_logo: false
+    show_language: false
+    show_day_night: true
+    show_search: true
+    highlight_active_link: false
+
+footer:
+  copyright:
+    notice: '© 2017 - {year} Xi Ruoyao. This work is licensed under {license}'
+    license:
+      enable: true
+      allow_derivatives: false
+      share_alike: true
+      allow_commercial: false
+
+# Localization
+
+locale:
+  date_format: 'Jan 02, 2006'
+  time_format: '22:00'
+
+# Site features
+
+features:
+  syntax_highlighter:
+    enable: true
+  math:
+    enable: true
+  diagram:
+    enable: false
+  privacy_pack:
+    enable: false
+      #  repository:
+      #    url: 'https://github.com/<username>/<repository>'
+      #    content_dir: content
+      #    branch: main
+  avatar:
+    gravatar: false
+    shape: circle
+  comment:
+    provider: ''
+    disqus:
+      shortname: ''
+      show_count: true
+    commento:
+      url: ''
+  search:
+    provider: wowchemy
+    algolia:
+      app_id: ''
+      api_key: ''
+      index_name: ''
+      show_logo: false
+  map:
+    provider: ''
+    api_key: ''
+    zoom: 15
+
+extensions:
+  academicons:
+    enable: true