Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website overhaul? #306

Open
vindarel opened this issue Feb 26, 2020 · 22 comments
Open

Website overhaul? #306

vindarel opened this issue Feb 26, 2020 · 22 comments

Comments

@vindarel
Copy link
Contributor

vindarel commented Feb 26, 2020

Continuing the nascent discussion in #279:

we'd enjoy a faster website generator (for local work), and a better looking theme.

Hugo themes for documentation: https://themes.gohugo.io/tags/documentation/

Use Coleslaw? https://github.com/coleslaw-org/coleslaw

Material for Mkdocs: https://squidfunk.github.io/mkdocs-material/ (python)

  • pretty complete
    cons: (update 2021)
  • need a redirection trick too. Its URL doesn't end in ".html", for example it's "getting-started/", not "getting-started.html".
@vindarel
Copy link
Contributor Author

vindarel commented Feb 26, 2020

Searching alternatives to gitbook: https://alternativeto.net/software/gitbook/?license=opensource

(edits)

@pnathan
Copy link
Member

pnathan commented Feb 26, 2020

I like this idea.

I also like the idea of coleslaw, because it's in lisp. But that's got no technical bearing, I think.

@arademaker
Copy link

Well, racket website is made in racket. We can’t ignore the impact of this.

@vindarel
Copy link
Contributor Author

vindarel commented Apr 13, 2020

Well, racket website is made in racket. We can’t ignore the impact of this.

at least common-lisp.net, Quickdocs and Cliki are made with CL…


I stumbled on Docsify and tried it: https://vindarel.github.io/cl-cookbook/ (edit: we can't see the new site there anymore, my master branch doesn't have the changes anymore. See them on https://github.com/vindarel/cl-cookbook/tree/website-docsify)

I like it and it seems to cover all our needs. It's a full-JS rendering engine that renders the markdown files, we don't have to generate HTML.

What's still there:

  • the TOC on the left sidebar, same structure overall

What's new:

  • modern, fashion-compliant look and feel
  • a welcome screen (it is currently the default)
  • a search box (although I experienced a couple issues)

What's missing and could be added:

  • syntax highlighting with HighlightLisp, which is better
  • a link to the page's source (either with an existing plugin either with our proper code)
  • we might loose on Search Engine Optimization, but it's possible to use a Server Side Rendering plugin.

What's possible:

What's impossible:

  • to read an url like …/#/getting-started with Emacs' Web Browser… but it's possible to read /getting-started.md in markdown! We could maybe advertise the alternative url on every page.

What do you all think, any strong objections?

I'll keep this open a few days.

@pnathan
Copy link
Member

pnathan commented Apr 15, 2020

syntax highlighting would be good.

SEO is something to think about, but I'm not too concerned right now. What I am concerned about: will existing links break? IE will we "break google" and break people's bookmarks?

@pnathan
Copy link
Member

pnathan commented Apr 15, 2020

I like the new theming btw.

@phoe
Copy link

phoe commented Apr 15, 2020

What I am concerned about: will existing links break?

This is a valid concern. Links to the Lisp Cookbook are already everywhere, from search engines through Stack Overflow to books (even if just WIP ones).

@vindarel
Copy link
Contributor Author

big lol, I thought about it once and quickly forgot. Yes they break, it's impossible to merge this.

@pnathan
Copy link
Member

pnathan commented Apr 15, 2020

:( I'm so sorry, you spent a lot of time on this.

@vindarel
Copy link
Contributor Author

We can laugh about that^^ yeah a bit but I know I'll use docsify soon again.

@phoe
Copy link

phoe commented Apr 16, 2020

Yes they break, it's impossible to merge this.

Not unless we prepare some sort of redirection/routing mechanism from the old links to the new ones. That requires a bit more HTML-generating work though.

@vindarel
Copy link
Contributor Author

vindarel commented Aug 1, 2020

I had another quick look at:

They both create the TOC of a page at the beginning, not on the side. And that's important to me.

It seems they don't use .html in URLs (maybe that's modern Jekyll).

The TOC is nice, same about the pages' URL lacking the .html extension.

So both also need a redirection strategy to not break existing links.

@vindarel
Copy link
Contributor Author

docusaurus looks nice with possibility to choose the url root but it's a hell of JS dependencies: https://v2.docusaurus.io/

@jgarte
Copy link
Collaborator

jgarte commented Mar 7, 2023

@jgarte
Copy link
Collaborator

jgarte commented Mar 8, 2023

@vindarel

Below are a few screenshots for reference of cl-cookbook ported to mkdocs with search functionality enabled. The search functionality works great! I did very little styling if any.

See the mkdocs.yml in the root of the project in the mkdocs branch.
I pushed a WIP mkdocs branch here: https://github.com/jgarte/cl-cookbook/tree/mkdocs

I needed to install just two packages in order to build the site:

python -m venv .venv
source .venv/bin/activate
pip install mkdocs pymdown-extensions

image

image

image

image

image

image

image

image

With the above shown, I still think it would be cool to build our own "mdbook" like in CL ;() cl-book?

@vindarel
Copy link
Contributor Author

vindarel commented Mar 8, 2023

It looks very nice from the screenshots, thanks for trying out.

You could enable Github Pages on your fork, so that you could publish your mkdocs theme and we could see it live (maybe you'll have to push the rendered html into a branch and tell GH Pages to use that as base site).

We'll have to handle transition of URLs (I see you put all files to a doc/ directory). Did you think about a plan?

@jgarte
Copy link
Collaborator

jgarte commented Mar 8, 2023

It looks very nice from the screenshots, thanks for trying out.

No probs, thanks.

Did you think about a plan?

Can you explain further what you mean about think about a plan? Are you referring to the migration of links and not to break existing ones?

You could enable Github Pages on your fork

I'll try that soon and let you know once it is up :)

@vindarel
Copy link
Contributor Author

The best is to not break existing links, but it would be acceptable to have redirection. If I access https://lispcookbook.github.io/cl-cookbook/getting-started.html it would redirect me to …/docs/getting-started.html or whatever the new page is. If we can bend the static site generator to our needs to not break the URLs the better.

@jgarte
Copy link
Collaborator

jgarte commented Mar 10, 2023

It looks like mkdocs has a plugin for redirects called mkdocs-redirects.

You would configure redirects in the redirect_maps setting of your mkdocs.yml file:

https://github.com/mkdocs/mkdocs-redirects#using

The redirect directive syntax looks like this:

plugins:
    - redirects:
        redirect_maps:
            'old.md': 'new.md'
            'old/file.md': 'new/file.md'
            'some_file.md': 'http://external.url.com/foobar'

So, I'm thinking that the roadmap for implementing this is the following:

  1. Deploy mkdocs website to personal GitHub pages so we can try it out easily as a community.
  2. Assess whether we really want to use mkdocs or some other static site generator/solution.
  3. Collect all redirects.
  4. Open PR with new site

@vindarel
Copy link
Contributor Author

💯

Assess whether we really want to use mkdocs or some other static site generator/solution.

I'd prefer, if possible, something faster and easier to install and use, such as Hugo: it's a single binary, and it's really fast. But any upgrade would be improvement. Maybe mkdocs is faster than Jekyll?

Redirects seem supported in Hugo:

@jgarte
Copy link
Collaborator

jgarte commented Mar 10, 2023

My only objection against hugo is that it would be a bear 🐻 to package for Guix because of all the transitive dependencies.

There have been attempts:

https://github.com/ryanprior/guix-packages/search?l=Scheme&q=hugo

But nothing close yet because of all the work involved.

Even if it does get packaged for Guix, maintaining the hugo package will be a pain.

Maybe Guix needs to get better at packaging golang stuff ;()

mkdocs and coleslaw are easily packaged in Guix:

https://toys.whereis.みんな/?search=coleslaw

https://toys.whereis.みんな/?search=mkdocs

Anyways these are my own biased preferences. Feel free to ignore 🙃

@jgarte
Copy link
Collaborator

jgarte commented Mar 10, 2023

Are redirects supported in coleslaw?

Or should we ignore that last question, succumb to the curse, and roll our own SSG with redirects support?

Might be a fun project/distraction to #306 😄 🦎

And CL might need a good mdBook-like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants