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

Feature request: choose page title #1984

Closed
gdalle opened this issue Mar 15, 2022 · 6 comments · Fixed by #2104
Closed

Feature request: choose page title #1984

gdalle opened this issue Mar 15, 2022 · 6 comments · Fixed by #2104
Labels
publishing Notebooks as static documents on the web

Comments

@gdalle
Copy link

gdalle commented Mar 15, 2022

Hi there!
When I open a notebook in my browser, the tab name only says "⚡ Pluto.jl ⚡". Same thing with link sharing on platforms like Discourse. Would it be possible to choose the name of the web page, or at least add the file name automatically?

@rikhuijzer
Copy link
Collaborator

You mean for notebooks hosted via PlutoSliderServer.jl? When running notebooks locally, I do see the title

@gdalle
Copy link
Author

gdalle commented Mar 15, 2022

In my case they are just static notebooks exported to HTML, such as https://gdalle.github.io/IntroJulia/

@fonsp
Copy link
Owner

fonsp commented Mar 24, 2022

4c31a6b is 10% of a fix: it removes the default title (⚡ Pluto.jl ⚡) and description (Pluto.jl notebooks) from the HTML document, which means that social media previews like discourse will use the filename as the page title.

@fonsp
Copy link
Owner

fonsp commented Mar 24, 2022

While working on the new plutojl.org website, I also found this problem! I am thinking about a standardized "frontmatter" system, allowing you to define the title, description, author, date, and more of the HTML export.

Right now, I (quickly) implemented by scanning for a global variable called frontmatter, like in this notebook: https://plutojl-preview.netlify.app/docs/widgets/javascript/ (link will probably break in the future). This is pretty cool, but maybe a GUI would be nicer... not sure if that's worth the time though.

@gdalle
Copy link
Author

gdalle commented Mar 25, 2022

Thanks for working on this! Not sure a GUI is worth it, putting frontmatter in a cell at the top (as long as this functionality is documented) seems very feasible for most Pluto users

@fonsp fonsp changed the title Feature request: choose page name Feature request: choose page title Mar 28, 2022
@fonsp
Copy link
Owner

fonsp commented Apr 4, 2022

#2008 was merged, but it was not yet used to solve this issue. Still to do: the generate_html(notebook::Notebook) function should call frontend(notebook) and use that to generate the header fields. They can be inserted with replace(conents, "<head>" => "<head>$(stuff)")

@fonsp fonsp mentioned this issue May 13, 2022
11 tasks
@fonsp fonsp added the publishing Notebooks as static documents on the web label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publishing Notebooks as static documents on the web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants