HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

arXiv widget #2266

Closed andrewfowlie closed 3 years ago

andrewfowlie commented 3 years ago

Feature Request

Is your feature request related to a problem? Please describe.

I find it a bit tedious to have to upload my publications (and those of my research group) to a webpage in markdown. I have created an automated solution base on the arXiv js widget and some existing work by Willie WY Wong (https://qnlw.info/project/custom-website/#arxiv-listing) to integrate it into hugo academic.

I have a JS widget here https://github.com/andrewfowlie/njnu_particle_physics_webpage/blob/main/static/js/arxiv_widget.js. This creates html for a list of arXiv articles found using the official arXiv js widget.

I then create my arXiv preprints pages like this:

---
title: ""
widget: blank
---

<script th:inline="javascript">
    var maxArticles=0;
    var showAbstract=1;
    var authorID=["fowlie_a_1"];
</script>
<script type = "text/javascript" src="/js/arxiv_widget.js"></script>
<div class="universal-wrapper">
<div class="article-style" itemprop="articleBody"><div id="arxivfeed"></div>
</div>

I think it's pretty cool. It gives this https://njnu-particle-physics.github.io/preprints/. The athor ID is the only bit a different user would need to change. I use it in the same way on the landing page (but with different maxArticles=5 and showAbstract=0) to create the latest pre-prints section https://njnu-particle-physics.github.io/

If more than one authorID is supplied, the articles are all collected then sorted by date and supplied.

Describe the solution you'd like I'd like to turn this into a proper widget inside the hugo-academic theme. I think loads of people would use this. But I don't really know what I'm doing, and would need help tidying the styling, html etc etc into something good enough for hugo-acaddemic master.

gcushen commented 3 years ago

Closing as an automated publication importer already exists: https://github.com/wowchemy/hugo-academic-cli . The importer is not limited to only arXiv preprints and generates static files for fast loading etc, unlike the proposal in this issue. Furthermore, the display of publications can be fully customised via the Pages/Featured widgets.

andrewfowlie commented 3 years ago

@gcushen the publication importer is a rather different solution. This one has some very nice advantages.

I can set my arXiv ID (and the IDs of for the other profiles on our group webpage) then forget it. No need to run a publication importer and update the webpage every time someone on the group publishes a new paper.

andrewfowlie commented 2 years ago

Kind suggestion to revisit this. An automated solution is way better for personal webpages if author is frequently making new papers, or academic group pages with many members, where there could be dozens of papers per month. Not as a replacement for current system, but as an alternative.

Quick refresher on idea.

If really can't be incorporated, let's make a fork and do it there (help welcome).