Project Viewer
We'll update this when we're farther in development
Version 2 Note
Version 2 will be a complete rewrite. It will ditch bootstrap and jquery, use Liaison version 2, use JS Autowire, have a (hopefully nice) design system & have project management built-in.
Disclaimer
- It is working, for version_1 of liaison. Liaison v2 is being developed and will bring many changes to the backend, and unless I screw up, this wiki lib shouldn't break in that process.
- It might not be working For non-liaison websites... but I WILL FIX IT... soon, hopefully.
Features
- File/Directory Navigator
- Prettified Code, thanks to Highlight.js. Not endorsed by or affiliated with HighlightJS. We're just using their very cool software.
- View Source code (prettified or raw)
- It's pretty? (Thanks to work already done on Wikitten)
- View images IN the wiki
TODO
View TODO
- Use this lib to show this lib's documentation on Taeluf.com
- Pick a better name
- More mobile-friendly file navigator
- Line numbers on prettified code
- "Projects" view for home page
- Fix relative links in MD files
- Inline "Toggle Source" button
- Deliver raw images for download
- Error handling for file-not found OR fallback to default routing
- I think Liaison v1 will provide some crummy error handling if there is no route found (meaning if the wiki misses). This should probably be disabled or optional, but it's a Liaison issue.
- Update for Liaison version_2 (which is also under development!)
- A "Copy" button for code blocks
- "Projects" navigator to replace file navigator.
- This would show "Project Name -> (children)" where (children) would be "docs" and "code"
- Some fancy git integration?
- To auto-pull updates from git repositories (maybe this is a git feature, not a feature for the wiki?)
- Allow editing, maybe?
- Probably not gonna happen unless someone else does it.
- Write tests, probably?
- Does changing the base url actually work? (It should!)
- Does it matter where the project dir is located? (it's not supposed to)
- Improve integration so your website theme doesn'tget completely replaced when showing the wiki.
- Add configuration options for... stuff
- Fix the
baseUrl
/projectsDir
relationship (as disclaimed in the usage) - Remove Jquery
- Move highlight.js dependency into the repo
- Use script & stylesheet compilation (Liaison feature) instead of all the
<script>
and<link>
tags - Refactor to make it more maintainable and sensible
Install
View Install Instructions
CLI
-
composer require taeluf/wikikitten-liaison dev-version_1
-
git clone https://github.com/Taeluf/Wikitten-Liaison.git
- then in
php
,require($cloneDir.'/5-App/core/LiaCat.php');
- then in
Composer.json
"require": {
"taeluf/wikitten-liaison": "dev-version_1"
}
Use it!
This will replace your website theme with the full wiki view.
Setup Files
Place your files for the wiki in the projectsDir
that you pass to addPackage(...)
.
Need to know: I think the baseUrl
has to match the trailing component of the projectsDir
. So if you use /dev/
for the base url, your projectsDir
must end in /dev/
as well. I know this is dumb & I intend to fix it.
Deliver the wiki
Place this code wherever it suits you. If the request is not for your wiki, then... I don't know. I think Liaison does something in that case.
$liaison = new \Liaison();
$liaison->addPackage(
['dir'=>\LiaCat::packageDir(),
'name'=>'Wiki',
'baseUrl'=>'/wiki/',
'projectsDir'=>__DIR__.'/SiteDirectory/public/wiki/'
]
);
$liaison->deliver();