Skip to content

Conversation

@Riceneeder
Copy link

@Riceneeder Riceneeder commented Oct 12, 2025

  • Created a new page layout (layout/pages/publications/publications.ejs) to display publication information including title, author, journal and DOI
  • Created a new stylesheet for the publications page (source/css/layout/publications.styl) to define the layout and styling for publication items.
  • Updated the main stylesheet (source/css/style.styl) to include the new publications styles.
  • Updated the corresponding translation files

Usage:

  1. Create data in source/_data/publications. yml, format example:
items:
- title: Deep Learning for Rice Yield
  authors: Alice Zhang, Bob Chen
  journal: Journal of Agricultural AI
  doi: 10.1234/example
  url: https://doi.org/10.1234/example 
  1. Create a page 'hexo new page publications' and edit' source/publications/index. md ':
---
title: title
date: 2025-10-12 19:04:49
type: publications
---

with enable developer mode:

  developer:
    enable: true

The effect is as follows:

image

Note

Adds a localized Publications page with EJS template, data wiring, styles, and updated translations/utilities.

  • Pages/UI:
    • Add layout/pages/publications/publications.ejs to render publications list with title/authors/journal, DOI resolving, and full-text/DOI actions.
  • Helpers/Logic:
    • Map publications page type in scripts/helpers/page-helpers.js.
    • Load publications data in scripts/data-handle.js from theme data sources.
  • Styles:
    • New source/css/layout/publications.styl; import in source/css/style.styl.
  • i18n:
    • Add keys (publications, no_publications, view_full_text, last_updated, untitled) across languages/en.yml, es.yml, fr.yml, ja.yml, zh-CN.yml, zh-TW.yml.
  • Build CSS:
    • Update 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.

EvanNotFound and others added 3 commits August 28, 2025 09:48
- 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.
cursor[bot]

This comment was marked as off-topic.

Repository owner deleted a comment from cursor bot Dec 19, 2025
@github-actions github-actions bot removed the stale label Dec 20, 2025
Repository owner deleted a comment from augmentcode bot Dec 23, 2025
Repository owner deleted a comment from augmentcode bot Dec 23, 2025
@EvanNotFound
Copy link
Owner

augment review

@augmentcode
Copy link

augmentcode bot commented Jan 18, 2026

🤖 Augment PR Summary

Summary: Adds a new Publications page layout for Hexo Theme Redefine.

Changes:

  • Add a new publications page type mapping and wire theme data into hexo.theme.config.publications.
  • Introduce layout/pages/publications/publications.ejs to render publications with an empty state, DOI parsing, and external actions.
  • Add source/css/layout/publications.styl and import it in the main Stylus entry.
  • Update i18n keys across languages and refresh Tailwind build output for new utilities used by the page.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

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}`;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolveDoi() currently strips https:// but doesn’t handle a common input like doi.org/10... (no scheme), which would produce https://doi.org/doi.org/10... and a broken link. Consider normalizing doi.org/ prefixes regardless of scheme before building url.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

return { url, label };
};

let publications = theme.publications.items
Copy link

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.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

<i class="fa-regular fa-newspaper"></i>
<%= journal %>
</p>
<% } %>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These external links use target="_blank" with rel="noopener"; elsewhere (e.g., bookmarks) the theme uses rel="noopener noreferrer". Consider adding noreferrer here as well for consistency and to avoid leaking referrer info (also applies to the DOI link below).

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


ol
margin 0
padding 0
Copy link

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.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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

Successfully merging this pull request may close these issues.

2 participants