Skip to content

Commit

Permalink
feat: Wiki On Steroids
Browse files Browse the repository at this point in the history
- wip: Approval Mechanism
- wip: Migrate from www/
- wip: build.json --> ESbuild
- wip: breadcrumbs on show
- wip: Wiki Sidebar (Converted Web Sidebar to tree)
- wip: Hierarchial Sidebar
- wip: docs search URL taken from the sidebars
- wip: Attachments support in edit mode from portal too
- wip: Rich Text Editor Support with attachment support
- wip: Collapsible headers in sidebar
- wip: Drag and drop support for sidebar in edit mode
- wip: Custom script support in wiki settings
- wip: Cached sidebar context
- wip: Auto table of contents highlighting
- wip: Two way communication between reviewer and patch raiser
  • Loading branch information
hasnain2808 authored Aug 2, 2021
1 parent 27139ca commit 3fcf486
Show file tree
Hide file tree
Showing 66 changed files with 3,890 additions and 251 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
tags
wiki/docs/current
wiki/public/css
wiki/public/dist
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<img width="299" alt="logotype" src="https://user-images.githubusercontent.com/9355208/94364059-467be400-00e4-11eb-99b2-31b5d05376c9.png">


Simple Wiki App built on the [Frappe Framework](https://frappeframework.com)
Simple Wiki App built on the [Frappe Framework](https://frappeframework.com). Powers [docs.erpnext.com](http://docs.erpnext.com/)


## Installation

Expand All @@ -16,25 +17,31 @@ $ bench --site sitename install-app wiki
## Features

1. Create Wiki Pages
2. Author content in markdown
3. Track page edits with revisions
2. Author content in Markdown or Rich Text
3. Set-up Controlled Wiki Updates
4. Unlimited Sidebar Hierarchy
5. Add attachments
6. Table of Contents
7. Caching
8. Custom Script Support via `Wiki Settings`

## Screenshots

### 1. Rendered Page
<img width="1552" alt="wiki-rendered" src="https://user-images.githubusercontent.com/9355208/94365126-03be0a00-00ec-11eb-8ce1-15c9c155ae29.png">
<img width="1552" alt="wiki-rendered" src="https://user-images.githubusercontent.com/28212972/127900631-c9b1c699-4a19-4b12-953e-308786d01c17.png">

### 2. New Page
<img width="1552" alt="wiki-new" src="https://user-images.githubusercontent.com/9355208/94365125-03257380-00ec-11eb-865d-fc8a469a43d7.png">
### 2. Edit Page
<img width="1552" alt="wiki-new" src="https://user-images.githubusercontent.com/28212972/127900757-9a3c9994-8e4c-42bc-99dd-f710a54315bb.png">

### 3. Edit Page
<img width="1552" alt="wiki-edit" src="https://user-images.githubusercontent.com/9355208/94365124-01f44680-00ec-11eb-98c5-21a4895e6e82.png">
### 3. Review Edited Page
<img width="1552" alt="wiki-new" src="https://user-images.githubusercontent.com/28212972/127900874-23664b1f-87e7-4e86-b4f3-c7e2c78ca0d7.png">

### 4. Revisions
<img width="1552" alt="wiki-revisions" src="https://user-images.githubusercontent.com/9355208/94365123-00c31980-00ec-11eb-9bd0-ca63418b4dfc.png">
<img width="1552" alt="wiki-revisions" src="https://user-images.githubusercontent.com/28212972/127901208-8b007e97-e779-4a5c-a097-06954e11a823.png">

### 5. Compare changes
<img width="1552" alt="wiki-compare" src="https://user-images.githubusercontent.com/9355208/94365116-f012a380-00eb-11eb-8ff1-fe3d2edceb64.png">
<img width="1552" alt="wiki-compare" src="https://user-images.githubusercontent.com/28212972/127901119-d7d7c3a8-2abd-453b-9318-67ad5861c72c.png">



#### License
Expand Down
8 changes: 8 additions & 0 deletions wiki/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
app_email = "[email protected]"
app_license = "MIT"

page_renderer = "wiki.wiki.doctype.wiki_page.wiki_renderer.WikiPageRenderer"

website_route_rules = [
{"from_route": "/<path:wiki_page>/edit", "to_route": "/edit"},
{"from_route": "/<path:wiki_page>/new", "to_route": "/new"},
{"from_route": "/<path:wiki_page>/revisions", "to_route": "/revisions"},
]

# Includes in <head>
# ------------------

Expand Down
22 changes: 6 additions & 16 deletions wiki/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,21 @@ def after_install():
# create the wiki homepage
page = frappe.new_doc("Wiki Page")
page.title = "Home"
page.route = "home"
page.content = "Welcome to the homepage of your wiki!"
page.published = True
page.insert()

# create the wiki sidebar
sidebar = frappe.new_doc("Website Sidebar")
sidebar.title = "Wiki Sidebar"
sidebar = frappe.new_doc("Wiki Sidebar")
sidebar.title = "Wiki"
sidebar.route = "wiki"
sidebar.append(
"sidebar_items", {"title": "Home", "route": "/wiki/home", "group": "Pages"}
)
sidebar.append(
"sidebar_items",
{
"title": "Edit Sidebar",
"route": "/desk#Form/Website Sidebar/Wiki Sidebar",
"group": "Manage Wiki",
},
)
sidebar.append(
"sidebar_items",
{"title": "Settings", "route": "/desk#Form/Wiki Settings", "group": "Manage Wiki"},
"sidebar_items", {"item": page.name}
)
sidebar.insert()

# set the sidebar in settings
settings = frappe.get_single("Wiki Settings")
settings.sidebar = "Wiki Sidebar"
settings.sidebar = sidebar.name
settings.save()
1 change: 1 addition & 0 deletions wiki/patches.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
wiki.wiki.doctype.wiki_page.patches.set_allow_guest
wiki.wiki.doctype.wiki_page.patches.delete_is_new
5 changes: 3 additions & 2 deletions wiki/public/build.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"wiki/css/wiki.css": ["public/scss/wiki.scss"]
}
"wiki/css/wiki.css": ["public/scss/wiki.scss"],
"wiki/js/wiki.min.js": ["www/editu.js"]
}
Loading

0 comments on commit 3fcf486

Please sign in to comment.