Code Monkey home page Code Monkey logo

raito's People

Contributors

arnaudsm avatar harryvederci avatar mckaygerhard 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

raito's Issues

[bug] subdir fix due confused rendering

from #9 now that mdwiki are defunct i will test this.. the relative link support from @arnaudsm allow to be the file readable from any git implementation..

You are using ROOT for rendering all the things and that's the problem.. and @uli-heller fixed that! your "relative" inplementation is *from root and not from the current place!

case1: using "[Level 2](subdir-01/subdir-02/)" this is the current supported @arnaudsm BUT you miscunderstand, it suppost ONLY IF I AM IN UPPER LEVEL ABOVE OF subdir-01 in current place but due you are using a ROOT global path it's working

case2: using "[Level 2](subfolder-02/)" this is the correct way if were inside https://github.com/arnaudsm/raito/blob/absolute-link-example/subfolder-01/README.md as you can check github renders incorrectly the link and just show: "https://github.com/arnaudsm/raito/blob/absolute-link-example/subfolder-01/subfolder-01/subfolder-02" noted the duplication of "../subfolder-01/subfolder-01/subfol..." at the github..

so that why @uli-heller has right here! -> https://stackoverflow.com/questions/24028561/relative-path-in-html

so i suggest that the changes of the @uli-heller must be implemented, please reopen this issue .. your subdir implementantion are wrong

[bug?] invalid not so kind offset for reference links

The current anchor reference implementation at #42 forced to have a hardcoded CSS trick see the video how on any reference the title is "cuttring off" by the scroll

offseterror

i was thinking in made a workaroun around scrollIntoView using scrollTo that permits to specify an offset, using a config variable if user wants.. with a default value set, i can made a pull request for if you wants..

index 4deecda..d607c3d 100644
--- a/index.html
+++ b/index.html
@@ -11,8 +11,9 @@
 <!-- USER CONFIG -->
 <script>
        const config = {
                sitePath: "/",
                browserRouter: false,
+               scrollworkaround: true,
                name: "Raito",
                components: ["docs/navbar", "docs/github"],
                errorMessage: "Page not found",
@@ -415,9 +412,17 @@
                                                loadContent();
                                        };
                        });
-               if (selector) document.getElementById(selector).scrollIntoView()
-
+               if (selector) {
+                       offsettag = window.innerHeight / 8
+                       taganchor = document.getElementById(selector);
+                       taganchor.scrollIntoView({behavior: "smooth", block: "start", inline: "start", offset: offsettag})
+                       if(config.scrollworkaround) {
+                               const y = taganchor.offsetTop - (offsettag);
+                               window.scrollTo( { top: y, left: 0, behavior: 'smooth' } );
+                       };
+               };
                document.body.classList.add("loaded");
+               
                if (!config.browserRouter) window.location.replace(config.sitePath + path);
        };
      

How to write Markdown links that reference local webserver root path

@arnaudsm, Is it possible to do the equivalent of <a href="/">Home</a> or <a href="/subdir/a.html">Goto A</a> in Markdown in Raito?

I've tried many variations but had no luck, and all the examples (/subdir/a, subdir/b, etc) use relative backpathing, e.g. [home](../../..) in Markdown to get back to the homepage.

Any server root links do not work in markdown, e.g.

[Next](/dir1/) 

[Next](/dir1/README.md)

[Home](/)

Thanks for your time!

SEO friendly its not well documented and promoted CloudFlare

the SEO its not well explained( #26 ) , or maybe there's a bug, cos it said: disabled by default, since it requires a default redirection to index.html

means that due index.html is the default rendering and the javascrip only parsed the content of the file, the web server need to provide a way to rewrite the url that always request the index.html as end point of each root web page ?

but :

i put to true browserRoute and sitePAth to "/wiki"

  • when requesting localhost/wiki/ it renders good
  • when requesting localhost/wiki/page it does not renders if i call from url of browser
  • when requesting localhost/wiki/page it renders if i call from a link inside a rendered page

so due last case its called from "index.html" as you pointed, works but you never defined a more explicit method to get such results, i only got a vage idea using rewrite, event spend in CloudFlare and give more importance to a enterprise..

also navbar fails in rare cases:

image

Subdir support

I forked raito and added subdir support to it (among others). Now I realized that there is a TODO list at the end of the README.md and "subdir support" shows up there.

Are you interested in a pull request?

Currently, my fork is probably way to fat but I'd factor out the subdir support in case you're interested.

Here, there are some examples of some nested subdirs to illustrate my understanding of the feature:

issues.zip
subfolder-01.zip

[bug] sitePath infinite redirection if runs from userdir module

NOTE: this bug are more ancient rather than the last changes you made

context:

Description

i setup to run raito into the user directory, so:

  • the user is general,
  • the path in webroot is /home/general/public_html/raito
  • the request looks as http://localhost/~general/raito/
  • the sitePath its set to /~general/raito/ (also tested /~general/raito )
  • the browserRouter was test with FALSE (seems related to comment on #36 (comment) )

But resulting

infinite redirections and a url as: http://localhost/~general/raito/#//~general/raito/#//~general/raito/#//~general/raito/#//~general/raito/#//~general/raito/#//~general/raito/#/

but if we change the browserRouter to true it work! of course cos only index.html its valid rendering

[feat] provide way to use include

in wikimedia, and dokuwiki there's a way to renders a page inside another.. just something like "frame" tag does in html..

please provide a way to do an include like that, example

page1.md:

# title

lorem ipsum

include(page2.md)

page2.md

more lorem ipsum

expected result

TITLE

lorem ipsum

more lorem ipsum

LICENSE.md

Could you please add some license info?

Chart.js integration

Hi,
I would like to include a chart in the markdown website.
for example from chart.js

# My Chart
<canvas id="myChart"></canvas>
<script>
const labels = [
  'January',
  'February',
  'March',
  'April',
  'May',
  'June',
];
const data = {
  labels: labels,
  datasets: [{
    label: 'My First dataset',
    backgroundColor: 'rgb(255, 99, 132)',
    borderColor: 'rgb(255, 99, 132)',
    data: [0, 10, 5, 2, 20, 30, 45],
  }]
};
const config = {
  type: 'line',
  data: data,
  options: {}
};
  const myChart = new Chart(
    document.getElementById('myChart'),
    config
  );
</script>

I put this in a markdown file and added a link to it, like the examples.md

Not sure if that makes sense to you. But I would really appreciate your help.
Thanks
Great project!

[bug][feat] support internal anchors or dont crash on references

This can be managed also as bug, but not cos this project is a debload version and prety minimalistic one..

so i used the feature request. cos can be not so easy to implement but easy to generate the rendering code (i guess it rely on the markdown rendering engine)

Bug present

By example i can check this same issue with https://github.com/arnaudsm/raito/issues/32 and https://github.com/arnaudsm/raito/issues/32# as same .. but

Explanation

  1. When you click on an internal anchor link, you will scroll automatically to the referred section and display it on your browser.
  2. Markdown rendering by default makes the titles or heads also anchors or internal references for those kind of links

Expected results

To understand internal link see the below examples.

## mytitle

Will become by markdown rendering as:

<h2><a href="#mytitle">mytitle</a><h2>

or more complex will become something like:

<h2><a id="mytitle">mytitle</a></h2>

Curren results

currently raito does not support such thing by default:

image

how to use bootswatch theme 5 (allow dark theme switch)

Like your project. But i hate white themes. but someone like it. so best option is

  1. follow user white/dark preference
  2. And or also include white/dark switch
  3. use themes which allows switching (tried but still can't see that switch as in original theme)

Tried in easybashgui change to theme version 5

Not sure what everything needs to be changed.

I think comment out more color definition. so will be used colors from themes?

promote into marked proyect

Introducing the ULTRALIGHT SIMPLISTIC raito rendering utility, among utilities that use markup.js, as a powered wiki engine, which competes strongly against other engines such as github wiki and mediawiki itself

markedjs/marked#2878

Including the raito into the utilities that uses marked.js project, it has powered features such as:

  • include macro, can be use to reuse common pages without rewrite same parts into other pages, this is a mayor feature from wikimedia and redmine wiki engines, still do not supported inside github wiki or gitlab wikis
  • static site generator, can be used as a fast generation web, just by editing the index.html css style, such can be changed to bootstrap just by minimal tune

[bug] is png, svg, jpg etc hashed!?

i cant understand the code but are the png, svg, jpg etc hashed!? why .. those are just images! and somethings must be cached in both sides

Table of content

Hi,

I would like to add a table of content to the website.
Do you know how this could be done?

Thanks again!
Ciao
Michael

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.