From ef7918b1aaee37f51e228ea969e82a17cf4fe1cf Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Tue, 27 Sep 2022 10:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Mathoid=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mathoid/README.md | 1 + mathoid/config.yaml | 106 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 mathoid/README.md create mode 100644 mathoid/config.yaml diff --git a/mathoid/README.md b/mathoid/README.md new file mode 100644 index 0000000..40e9314 --- /dev/null +++ b/mathoid/README.md @@ -0,0 +1 @@ +# 异世界百科 Mathoid配置文件 \ No newline at end of file diff --git a/mathoid/config.yaml b/mathoid/config.yaml new file mode 100644 index 0000000..f1821ef --- /dev/null +++ b/mathoid/config.yaml @@ -0,0 +1,106 @@ +# Number of worker processes to spawn. +# Set to 0 to run everything in a single process without clustering. +# Use 'ncpu' to run as many workers as there are CPU units +num_workers: 0 + +# Log error messages and gracefully restart a worker if v8 reports that it +# uses more heap (note: not RSS) than this many mb. +worker_heap_limit_mb: 250 + +# Logger info +logging: + level: trace +# streams: +# # Use gelf-stream -> logstash +# - type: gelf +# host: logstash1003.eqiad.wmnet +# port: 12201 + +# Statsd metrics reporter +metrics: + type: statsd + host: localhost + port: 8125 + +services: + - name: mathoid + # a relative path or the name of an npm package, if different from name + module: ./app.js + # optionally, a version constraint of the npm package + # version: ^0.4.0 + # per-service config + conf: + port: 10044 + # interface: localhost # uncomment to only listen on localhost + # more per-service config settings + # the location of the spec, defaults to spec.yaml if not specified + # spec: ./spec.template.yaml + # allow cross-domain requests to the API (default '*') + cors: '*' + # to disable use: + # cors: false + # to restrict to a particular domain, use: + # cors: restricted.domain.org + # content for the CSP headers + # csp: false # uncomment this line to disable sending them + # URL of the outbound proxy to use (complete with protocol) + # proxy: http://my.proxy.org:8080 + # the list of domains for which not to use the proxy defined above + # no_proxy_list: + # - domain1.com + # - domain2.org + # the list of incoming request headers that can be logged; if left empty, + # the following headers are allowed: cache-control, content-length, + # content-type, if-match, user-agent, x-request-id + # log_header_whitelist: + # - cache-control + # - content-length + # - content-type + # - if-match + # - user-agent + # - x-request-id + # list of enabled renders + csp: "style-src 'self' 'unsafe-inline'; script-src 'self';" + svg: true + img: true + png: true #new feature + speech: true #new feature + texvcinfo: true + speech_on: true + speech_config: + semantics: true + domain: 'mathspeak' + style: 'default' + semantic: true + minSTree: false + speakText: true + enrich: true + mj_config: + extensions: "TeX/color,TeX/mediawiki-texvc,TeX/mhchem" + MathJax: + menuSettings: + semantics: true + SVG: + font: "TeX" + TeX: + noErrors: + disabled: true + no_check: false + dpi: 180 + svgo: false + # the user agent to use when issuing requests + # user_agent: service-template-node + # the template used for contacting the MW API + mwapi_req: + method: post + uri: http://www.isekai.cn/api.php + headers: + user-agent: '{{user-agent}}' + body: '{{ default(request.query, {}) }}' + # the template used for contacting RESTBase + restbase_req: + method: '{{request.method}}' + uri: 'http://localhost:7231/{{domain}}/v1/{+path}' + query: '{{ default(request.query, {}) }}' + headers: '{{request.headers}}' + body: '{{request.body}}'