support post tags, auto generate TOC by tag#20
Open
zeronetscript wants to merge 17 commits intoHelloZeroNet:masterfrom
Open
support post tags, auto generate TOC by tag#20zeronetscript wants to merge 17 commits intoHelloZeroNet:masterfrom
zeronetscript wants to merge 17 commits intoHelloZeroNet:masterfrom
Conversation
when selecting posts, select count(*) from post as first row so we can do better page display
previously only show prev/next, hard to jump. this improve it by: support jump to first/last page show current page and neighbour page links (instead of prev/next) if not all next pages can showup, ... added to last link to notice user
add an entry in routeUrl to dispatch ?Toc= type url, then pageToc query all blogs and generate a simple index for all, these index grouped by same month (empty month skipped) order by date. page query not implemented currently
blog can have a space splited tag list,these value-post_id map stored in tag table. I think best way to implement this should be insert trigger and CTE(requires sqlite 3.8.3), but zeronet didn't assume this, so this implements by maintain tag table in frontend (coffeescript)
in post page, add a "taglist" under detail div, every tag is showed as a link to query page , untagged post also has a link to query all untagged posts(query implemented in next commit).this field can be edit just like title and body
support three type TOC: index.html has link to "?Toc=tagAll", which generated a overview tag index page as: tag1: n post(s) ---> links to ?Toc=tag:tag1,shows all posts has tag1 tag2: m post(s) ... untagged: x post(s) ---> links to Toc=tagNone, shows all posts without tags. same post may belongs to many tag,leads too many duplicate, so tagAll didn't show every posts. user can jump to extactly tag list from the "tag list" part of every post (in previous commit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
these commits implements blog tag function. with this:
1.every post can have multi tags , which appears in details part ,
2.every tag (or untagged) appears as a link , which links to a TOC page of this tag(or show all untagged).
3.an overview TOC page, show all tag: n post(s), helps user navigate to that tag TOC (same as 2)
these changes consider upgrade from old data condition, user can overwrite index/js/css/dbschema then get all these functions