Skip to content

Commit

Permalink
Commit with Git-Sync-JS
Browse files Browse the repository at this point in the history
  • Loading branch information
tiddlygit-test authored and Johntang666 committed May 23, 2023
1 parent 0393527 commit 1388ab5
Show file tree
Hide file tree
Showing 184 changed files with 13,192 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.scss]
indent_size = 2

[*.js]
indent_size = 2

[*.jsx]
indent_size = 2

[*.ts]
indent_size = 2

[*.tsx]
indent_size = 2

[*.vue]
indent_size = 2

[Makefile]
indent_style = tab
42 changes: 42 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy Tiddlywiki To Github Pages

on:
push:
branches:
- main
- master

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2-beta
with:
node-version: '16'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Install Dependency
run: npm install
- name: Build
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: ./public-dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.DS_Store
node_modules
output
public-dist
$__StoryList.tid
settings/settings.json
tiddlers/subwiki/

# ignore some change from plugin that will only change "modified" field
$__keepstate_*
tiddlers/$__Import.tid
tiddlers/$__layout.json
tiddlers/$__layout.json.meta
tiddlers/$__layout.tid
13 changes: 13 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
printWidth: 160,
arrowParens: 'always',
jsxBracketSameLine: true,
jsxSingleQuote: false,
quoteProps: 'as-needed',
bracketSpacing: true,
useTabs: false,
};
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Tiddlywiki-NodeJS-Github-Template

Default wiki template for [TidGi-Desktop](https://github.com/tiddly-gittly/TidGi-Desktop), an App that can generate template wiki on one-click.

Knowledge base Template, with advanced filter search and faceted data aggregation.

[onetwo.ren/wiki](https://onetwo.ren/wiki) is an example of this template. And [tiddly-gittly.github.io/Tiddlywiki-NodeJS-Github-Template/](https://tiddly-gittly.github.io/Tiddlywiki-NodeJS-Github-Template/) is deployed example of this repo. (There are some optimization to make this demo readonly, and being not downloadable, so its size is almost as small as a GIF picture.)

Downloadable HTML is at [tiddly-gittly.github.io/Tiddlywiki-NodeJS-Github-Template/index-full.html](https://tiddly-gittly.github.io/Tiddlywiki-NodeJS-Github-Template/index-full.html), which contains edit related plugins, and will be slightly bigger (a size of a tiktok video.)

This repo used to contains the wiki backup data and script to start a local wiki server on MacOS on start up. It is now deprecated, and no money to maintain, now [TiddlyGit-Desktop](https://github.com/tiddly-gittly/TiddlyGit-Desktop) is preferred. Old version can be found at the [feat/auto-start branch](https://github.com/tiddly-gittly/Tiddlywiki-NodeJS-Github-Template/tree/feat/auto-start). Contribution to it is welcome.

## Setup

[用TiddlyWiki替代Notion和EverNote作为个人知识管理系统 (Chinese)](https://onetwo.ren/%E7%94%A8tiddlywiki%E6%9B%BF%E4%BB%A3notion%E5%92%8Cevernote%E7%AE%A1%E7%90%86%E7%9F%A5%E8%AF%86/)

English translation comeout soon. (?)

## Deployed to Github Pages

Automatically.

## NPM Scripts

`npm build`: pack tiddlywiki data to a HTML file

## Shell Scripts

[scripts/build-wiki.js](scripts/build-wiki.js) will actually pack tiddlywiki data to a HTML file

## Credit

Scripts are inspired by [DiamondYuan/wiki](https://github.com/DiamondYuan/wiki)
34 changes: 34 additions & 0 deletions html-minifier-terser.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"caseSensitive": false,
"collapseBooleanAttributes": true,
"collapseInlineTagWhitespace": false,
"collapseWhitespace": true,
"conservativeCollapse": false,
"continueOnParseError": true,
"customAttrCollapse": ".*",
"decodeEntities": true,
"html5": true,
"ignoreCustomFragments": ["<#[\\s\\S]*?#>", "<%[\\s\\S]*?%>", "<\\?[\\s\\S]*?\\?>"],
"includeAutoGeneratedTags": false,
"keepClosingSlash": false,
"maxLineLength": 0,
"minifyCSS": true,
"minifyJS": true,
"preserveLineBreaks": false,
"preventAttributesEscaping": false,
"processConditionalComments": true,
"processScripts": ["text/html"],
"removeAttributeQuotes": true,
"removeComments": false,
"removeEmptyAttributes": true,
"removeEmptyElements": false,
"removeOptionalTags": true,
"removeRedundantAttributes": true,
"removeScriptTypeAttributes": true,
"removeStyleLinkTypeAttributes": true,
"removeTagWhitespace": true,
"sortAttributes": true,
"sortClassName": true,
"trimCustomFragments": true,
"useShortDoctype": true
}
Loading

0 comments on commit 1388ab5

Please sign in to comment.