-
-
Notifications
You must be signed in to change notification settings - Fork 181
feat: Add Publications page layout #568
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
base: dev
Are you sure you want to change the base?
Conversation
readme update
- Created a new stylesheet for the publications page (`publications.styl`) to define the layout and styling for publication items. - Updated the main stylesheet (`style.styl`) to include the new publications styles.
|
augment review |
🤖 Augment PR SummarySummary: Adds a new Publications page layout for Hexo Theme Redefine. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (!value) return { url: null, label: null }; | ||
| const trimmed = String(value).trim(); | ||
| const label = trimmed.replace(/^https?:\/\/(doi\.org\/)?/i, '').replace(/^doi:\s*/i, ''); | ||
| const url = trimmed.startsWith('http') ? trimmed : `https://doi.org/${label}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return { url, label }; | ||
| }; | ||
|
|
||
| let publications = theme.publications.items |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let publications = theme.publications.items will throw if theme.publications (or items) isn’t defined, but the template already has an “empty publications” UI. Consider defaulting publications to an empty array when the data file is missing or malformed so the empty state can render instead of crashing.
🤖 Was this useful? React with 👍 or 👎
| <i class="fa-regular fa-newspaper"></i> | ||
| <%= journal %> | ||
| </p> | ||
| <% } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| ol | ||
| margin 0 | ||
| padding 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .publications-page-container ol { padding 0 } rule will override the Tailwind pl-6 sm:pl-8 classes on the <ol> in the new template due to higher specificity, which can remove the intended list indentation/markers alignment. Consider dropping or narrowing this reset so the utility padding can take effect.
🤖 Was this useful? React with 👍 or 👎
layout/pages/publications/publications.ejs) to display publication information including title, author, journal and DOIsource/css/layout/publications.styl) to define the layout and styling for publication items.source/css/style.styl) to include the new publications styles.Usage:
source/_data/publications. yml, format example:with enable developer mode:
The effect is as follows:
Note
Adds a localized Publications page with EJS template, data wiring, styles, and updated translations/utilities.
layout/pages/publications/publications.ejsto render publications list with title/authors/journal, DOI resolving, and full-text/DOI actions.publicationspage type inscripts/helpers/page-helpers.js.publicationsdata inscripts/data-handle.jsfrom theme data sources.source/css/layout/publications.styl; import insource/css/style.styl.publications,no_publications,view_full_text,last_updated,untitled) acrosslanguages/en.yml,es.yml,fr.yml,ja.yml,zh-CN.yml,zh-TW.yml.source/css/build/tailwind.css(v4.1.14) with utilities used by the new page.Written by Cursor Bugbot for commit b49a516. This will update automatically on new commits. Configure here.