Coder Social home page Coder Social logo

open-md's People

Contributors

shyazusa avatar

Watchers

 avatar

open-md's Issues

index.mdの自動生成

index.mdでなくても良いのだけれど、各ディレクトリと各ファイルへのリンクを自動で作成する何かが欲しいね。

nofile処理のリファクタリング

if File.exist?("md/#{filename}.md")
  f = File.read("md/#{filename}.md", encoding: Encoding::UTF_8)
else
  f = File.read("md/nofile.md", encoding: Encoding::UTF_8)
end

ここ処理まとめる。
後置unlessfilename変えればイケる?

css入れる

markdownが質素?な感じがするので、何かcssを入れたい

処理をdefでまとめる

t = File.read("#{d}/#{f}.md", :encoding => Encoding::UTF_8)
Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(t)

の処理、読み込むためのファイル指定部分以外は同じ処理なので、まとめる。

markdown("#{d}/#{f}.md")

とやったらもう表示までしてくれるのが良いかな。

get '/directory/' do を追加する

/directory/とアクセスすると、/directory/indexに飛ぶようにする。
……というかメインとなるファイルはindexでいいのか?

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.