Article Details
Formatting guide:   **bold**   *italic*   ## Heading 2   ### Heading 3   - list item   [FORMULA: v = √(2GM/r)]   [TIP: your tip text here]
🚀 Publish
📄 File Name
article-your-article-title.html
Upload this file to Cloudflare Pages alongside your other files
👁 Live Preview updates as you type

Start typing your article to see a preview...

📝 How to Write & Publish an Article

The process is simple and takes about 5 minutes per article:

  • Step 1: Go to the "Write Article" tab and fill in your title, category, description and content.
  • Step 2: Use the toolbar buttons to format headings, bold text, lists, formula boxes and tip callouts.
  • Step 3: Click "Download Article File" — it saves an .html file to your computer.
  • Step 4: Go to pages.cloudflare.com → your project → "Create new deployment" → upload the new file.
  • Step 5: Update blog.html to add your article to the listing (see below).

🔗 Adding Your Article to the Blog Page

After uploading your article file, open blog.html in a text editor (Notepad is fine) and find the articles grid section. Copy this template and paste it inside the <div class="articles-grid">:

<a href="YOUR-FILE-NAME.html" class="article-card reveal" data-cat="physics"> <span class="article-emoji">⚛️</span> <span class="article-cat"> <span class="meta-tag tag-physics">Physics</span> </span> <h3 class="article-title">YOUR ARTICLE TITLE</h3> <p class="article-excerpt">YOUR SHORT DESCRIPTION</p> <div class="article-meta"> <span class="article-time">⏱ 5 min read</span> </div> </a>

Change data-cat="physics" to astronomy, aerospace or nuclear as needed. Change tag-physics to match.

🔐 Changing Your Password

Open admin.html in any text editor (Notepad, TextEdit, VS Code). Search for:

const ADMIN_PASSWORD = 'cosmoscalc2025';

Replace cosmoscalc2025 with your own password. Save the file and re-upload it to Cloudflare.

💡 Writing Tips for SEO

  • Put your main keyword in the title (e.g. "How Black Holes Form" not "The Dark Stuff")
  • Write at least 600–800 words per article — Google prefers longer content
  • Use H2 and H3 headings every few paragraphs to break up the text
  • Add a formula box or table — Google loves structured content in science articles
  • Link back to your calculators at the end of each article
  • Include the year in your title if writing about current events (e.g. "in 2025")
`; const blob = new Blob([html], {type:'text/html'}); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = `article-${d.slug}.html`; a.click(); showToast('✅ Article downloaded! Upload to Cloudflare.','success'); } // ===== TOAST ===== let toastTimer; function showToast(msg, type='success'){ const t = document.getElementById('toast'); t.textContent = msg; t.className = `show ${type}`; clearTimeout(toastTimer); toastTimer = setTimeout(()=>{ t.className = ''; }, 3200); } // Init preview updatePreview(); document.getElementById('artDate').value = new Date().toISOString().split('T')[0];