GithubHelp home page GithubHelp logo

emacsorphanage / org-page Goto Github PK

View Code? Open in Web Editor NEW
673.0 673.0 101.0 2.27 MB

[INACTIVE] A static site generator based on Emacs and org mode.

Emacs Lisp 45.52% CSS 27.69% JavaScript 7.76% Mustache 19.03%

org-page's People

Contributors

accidentalrebel avatar ccsheller avatar chunhuawu avatar crinklewott avatar drtutut avatar dsdshcym avatar jixiuf avatar jonathan-arkell-at-cisco avatar jonnay avatar jtmoulia avatar kleinmann avatar kuangdash avatar naihe2010 avatar phaer avatar postspectacular avatar rudolfochrist avatar sillykelvin avatar smaximov avatar swaroopch avatar syohex avatar tgallant avatar tumashu avatar xcodebuild avatar xiaohanyu avatar yantar92 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  avatar  avatar  avatar  avatar

org-page's Issues

html files of tags and recent posts not generated

when publishing project the first time, the generated org files of tags and recent posts are not published to html.

reason:
the to-be-published file list is generated before the tags and recent posts org file generated, so they are not included in the file list, update the file list after the org files generation can solve this problem.

Remove unused variables

As others suggested, "Convention over Configuration", so variable like op/css-list makes no use. delete variables like this.

Update README

The definition of op/do-publication is changed, update README to make them match.

--edit--
New function op/new-repository is added, add section in README to introduce it.

No org files are published

In function op/publish-changes, there is a code snippet:

(when (member org-file upd-list)
  (op/publish-modified-file
    (car file-attr-list) pub-root-dir ext-plist))

org-file is always like "/home/xxx/ab.org", but upd-list is always like (... "~/ab.org" ...), so no org file can match the string and of course no files are published.

about page cannot be generated

currently the about page "about.org" is treated as a normal post, so it is generated as a blog post, not the about page.

garbage characters

by default the html page charset is "iso-8859-1", should use "utf-8" instead, otherwise DBCS will show as garbage characters.

Add mustache template support and some more modernized elisp library?

hi, kelvin:

I've found template with elisp format-spec is not flexible enough, and it is not user-friendly for template designers(for example, %d, %a is not as clearly understandable as {{date}}, {{author}}).

How do you think that we turn the simple format-spec based template to mustache-based template strategy? There're already some simple elisp library that support mustache, see:

I know this new strategy will put on some new dependencies on org-page, but I think it worth it in the long run. I've also found some good elisp libraries which may be useful:

I think these library should make org-page's code simpler and shorter, with the cost of importing extra dependencies.

Wait for you advice.

Change the encoding of generated files

The encoding of generated files, such as files under folder "tags", is "ISO-8859-1", so DBCS on this kind of page will show as garbage character, change it to "UTF-8".

common page title

there should be a common page title, except navigation bar and post title.

source code snippets are messed up

code snippets between #+begin_src and #+end_src are converted into one line, but code snippets defined after colon : are not affected.

Improve directory processing

Every time when using op/repository-directory, (file-name-as-directory op/repository-directory) is required to ensure correctness. Ensure it before publication will save many efforts, so does many other directories, like pub-root-dir, etc.

Update op/export-as-html

Remove the meta tag generation time, otherwise publication everytime will update the time for auto generated tag pages and git will consider them as modified, in fact, they are actually not modified.

org-page mess around the org files

Ref: http://www.v2ex.com/t/53456#reply8

  1. .emacs configured as org-file guide
  2. export function looks working, and the html file was generated successfully
  3. but the org-file content structure was messed, e.g.
 - item1
 - item2
 - item3

became

 - item1 -item2 -item3
  1. the headings wasn't changed
  2. the code blocks or sample or sources were also changed by replacing the \r\n with nothing

Theme change will not take effect

Corresponding variables, e.g. op/html-head-template, are set when defined. Any changes to op/theme later cannot affect these variables, so theme change will not take effect.

add republish all support

when you change the entire site to a new theme, you need to republish all files. The op/republish all function just republish all *.org files one by one.

integrate disqus

Currently the section about disqus is hard coded, implement it.

add op/new-project support

I've dived into the code and find it promising using the new git-based publishing strategy. But they are some requirement which is much be set before you can publish the project. Say, let project-dir be "/tmp/op-pub", then "/tmp/op-pub" must be:

  • the "/tmp/op-pub" must be a git repo
  • the git repo must have "master" and "source" branch
  • the "/tmp/op-pub" should have some basic directory structure?

What op/new-project do is just build a basic project structure based on which the users can add new org files and publish it directly.

tag files are included in sitemap and recent posts

because tag org files are treated as normal to-be-published files, they are also included while generating sitemap org file and recent posts org file, please remove them from the included file list.

try limit line length to 80 in code

I've found some code in org-page.el is 160 characters long, that makes code reading on laptop difficult.

As a convention, I'll try to make some refactoring and restyle to the code, if you agree with me, kelvinh.

Update descriptions

Update descriptions for op-export.el, op-enhance.el, op-vars.el.
Especially the last.

[coding style]use let instead of let* when possible

I think it's better to use let instead of let* when possible. I don't know whether elisp has this coding style limit, but I do remember that common lisp recommand using let instead of let* when possible.

In common lisp, let has more clear semantic and better performance(for example, let can do parallel assignment while let* must do sequential assignment.

I'll do some code refinement this week.

refine the path when reorganizing the project structure

currently "category" does not make much sense, when reorganizing the project structure, make a new directory with the name of the file's category, and put the file in it, so, at last a file will have the following path:
<op/root-directory>/src/<category>/2012/11/25/<file-title>/index.org
I think this kind of structure is much better.

add collapsable and copiable code block support

code block in exported org html files is just long long htmlized plain text. When code is long, it should make it possible collapable and copiable.

I'm not sure whether or not javascript can do this, but I'll try it.

Garbage characters

Garbage characters occur when title has DBCS, but post contents only contain ASCII.

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.