Giter Site home page Giter Site logo

cooper / quiki Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 7.0 19.01 MB

a file-based web engine and server featuring a productive source language, markdown, image generation, categories, templates, and revision tracking

Home Page: https://quiki.app

License: ISC License

Go 62.61% CSS 4.54% JavaScript 26.91% HTML 5.91% Shell 0.04%
golang go wiki wiki-engine http-server wikifier markdown-wiki file-based cms markdown

quiki's Introduction

quiki

quiki is a fully-featured wiki suite and standalone web server that is completely file-based. instead of storing content in a database, each page is represented by a text file written in the clean and productive quiki source language.

it sports caching, image generation, category management, templates, markdown integration, git-based revision tracking, a web-based editor, and much more.

install

go get github.com/cooper/quiki

configure

quiki ships with a working example configuration and detailed configuration spec.

cp quiki.conf.example quiki.conf
nano -w quiki.conf

run

quiki quiki.conf    # ($GOPATH/bin/quiki if PATH not configured for go)

Did you expect this page to be longer?

quiki's People

Contributors

cooper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

quiki's Issues

references

Need to add support for inline references like [1] and reference{} block. It existed in wikifier many years ago but was removed at some point... cooper/wikifier#46

table of contents

To enable,

@page.enable.toc;

which can also be in the wiki config to make it default behavior.

model: style{} does not work inside

When model tags are disabled, styles within models will probably no longer work.

I think overriding the ID for q-main within models would work. Since models are compiled with each page that uses them, the IDs shouldn't clash, if I'm thinking correctly. See cooper/wikifier#72

simplify wiki directory configurations

wikifier and quiki have always allowed you to configure arbitrary paths for resource and cache directories:

@dir.page: 		[@dir.wiki]/pages;
@dir.image: 		[@dir.wiki]/images;
@dir.model: 		[@dir.wiki]/models;
@dir.cache: 		[@dir.wiki]/cache;

It has never been required that these paths exist within dir.wiki, since all of these existed long before dir.wiki did. Thus, you can point to resources outside of the wiki root. You could also share resource directories between multiple wikis.

Now though, it would simplify things a lot to eliminate all of these options, rely solely on dir.wiki, and use a standard wiki file tree structure. Particularly, when working with multiple branches at a time, it would allow dir.wiki to point to a linked repository and as a result all of the resource and cache paths would point to that git worktree rather than the primary repository.

wiki/image: image info pages

Optionally enable image detail pages which mention image author, license, etc. When enabled, default image links to this page rather than actual full-sized image.

model variable type inference

I think we can fairly reliably infer whether variables in models are strings or booleans. If it is displayed anywhere, it is a string. If it is used in a conditional but not displayed, it is a boolean. Keep in mind that strings can be tested in conditionals too, so string inference overrides boolean.

later this can be used in frontends to make forms for model data:
img_9693

editor will not let you select text

so I just realized that somehow, the editor is broken and won't accept any input or even let you select text or interact with it in any way

wikifier/formatter: invalid links to not-yet-existent categories

Let's say you purge your entire site cache. A page is generated that links to a particular category. Although pages belonging to that category exist, they just haven't been generated yet, and so the category file has not yet been created. As a result the links are displayed as invalid.

allow page root to be /

better put, allow page root to be same as wiki root. check for pages when otherwise a 404 would be served. the page root would be left blank so that page links would be relative to the wiki root.

improve logging

there is basically no logging rn except to std out. need parse warnings/errors to produce useful output, wiki logs, etc.

wiki/revision: copy cache to new branches

Currently since cache dir is not versioned, creating a new branch with a linked repo results in no cache available to adminifier to display resource metadata like page titles. I'd say at least copy the category caches when creating the branch, definitely not the images though. Images could point to the real cache dir for existing dimensions, and we could generate them for previews of sizes that don't exist in the main repo. Be sure not to copy the branches cache either.

template: extra values in Pages

wikiPage.Pages seems to have extra/empty pages sometimes or perhaps the length is wrong

For example:

{{template "header.tpl" .}}
{{range $i, $p := .Pages}}
    {{with $alternate := odd $i }}
        <div class="main-wrapper alternate">
    {{else}}
        <div class="main-wrapper">
    {{end}}
        {{$p.HTMLContent}}
    </div>
{{end}}
{{template "footer.tpl" .}}

results in several extra <div class="main-wrapper"></div>

improve built-in templating

Goals for templating in quiki

  • It should be possible to edit templates online.
  • It should be possible for the same "living" template to be shared by multiple sites.
  • Templates should not include any CONTENT, only the structural/visual frameworks.
  • Templates should be versioned.

Here's where I've not made up my mind yet:

  • How can templates be edited online if they might not be associated with just one quiki site?
    • Maybe: Templates could optionally be included as a git submodule, allowing them to exist and be edited independently for each site.
    • Or, you could just not set up a separate repository for it and version it normally within the site repository (if it is only intended to be used for that one site).
  • Should templates be written in the quiki markup language itself, or stick to Go templating?
  • If written in quiki markup, should we distinguish between templates and models?
    • Should they be stored in different directories? Probably.
    • If so, I guess templates could include other templates and/or models, but models and pages would not be allowed to include templates.

image: need to consider available sizes for scaling

Ever since switching from retina.js to srcset, images are not rendered at the correct size when the scaled image would be larger than the original. In these cases, the 2x and 3x/etc images are symlinked to the original, so the logical image size ends up being smaller the greater the device pixel density.

symlink redirects on windows

perhaps we could identify files with a single line that ends in a possible page file extension and follow them as though they are symlinks. it would be nice to also support symlinked directories, but that would be a lot more difficult.

Categories not working correctly on windows

the test suite categories fail to generate .cat files for the standard type categories on Windows. the pseudo-categories are prefixed with underscores, I would guess because it is probably a normalized version of the path which the backslash on Windows is not stripped off appropriately first

improve parser positioning

parser needs to be better at tracking the current line and column for error and warning positioning in the adminifier UI

parser: variable tokens in text at document level

Stray text at the document level is treated as content of the first section. These tokens for variable assignment are not properly handled when they occur in this text.

var variableTokens = map[byte]bool{
	'@': true,
	'%': true,
	':': true,
	';': true,
	'-': true,
}

concurrent generating

Sometimes page cache files end up blank. It seems to occur if a page is requested during an ongoing regeneration initiated by the file monitor.

setup wizard

it would be neat if quiki had a first run wizard, in the adminifier interface. it would basically just be the server admin console, except prefaced by a page to set up an initial godlike admin user account.

regenerate pages that point to newly existent targets

When a page is generated for the first time that previously did not exist but had other pages pointing to it, regenerate those pages which reference the new page so that the links are followed. In the opposite sense, perhaps regenerate referencing pages when a target is deleted so that the links no longer follow. The presence of the page_info dict in the page category manifest could be used to test whether the page previously existed.

adminifier permissions

need to be able to assign specific permissions to users in auth.json. then in wiki.conf could define . perhaps default classes/roles could be defined for all wikis too.

authentication for viewing pages

Needs to be possible to restrict certain categories or folders to specific users or groups. Per-wiki authentication outside of the admin panel is needed anyway so that only authenticated users can preview unpublished drafts in other branches than master.

Keep in mind the current and default behavior for the session cookie is to restrict it to the HTTP host, which may or may not be the same as the host where the wiki itself is located. If this cannot be avoided, separate session login could occur per wiki root, as long as the transition is seamless.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.