github-pages

Jekyll posts filenames without dates

孤人 提交于 2021-02-19 03:44:05
问题 I don't care about dates because I edit my previous posts all the time, so I would like to replace _posts/2015-05-05-something.md by _posts/something.md . 回答1: Using pages doesn't require files to have dates, eg: _posts/2015-05-05-something.md becomes something.md . (The answer came from the amazing Github support) 回答2: To do it you need to edit _config.yml file. Variable you are interested in is permalink . Jekyll has 4 build-in styles: date - /:categories/:year/:month/:day/:title.html

How to trick react router into thinking `/` is the mount directory?

旧时模样 提交于 2021-02-11 14:13:49
问题 Let's say I have a simple react app: import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter as Router, Route} from 'react-router-dom' import * as serviceWorker from './serviceWorker'; import App from './App'; import About from './components/pages/About' import Header from './components/layout/Header'; ReactDOM.render( <React.StrictMode> <Router> <Route path = "/" component={Header} /> <Route exact path="/" component= {App} /> <Route path="/about" component = {About

Can't deploy webpack to gh-pages (react app)

拟墨画扇 提交于 2021-02-11 13:09:25
问题 First time using webpack as well as deploying using gh-pages. I cloned a webpack project from a udemy course. Instructor doesn't get into how to actually use webpack. It's telling me that [etc.]/build doesn't exist. When I create a build folder, I get the same error. package.json: "scripts": { "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js", "build": "webpack -p --config ./webpack.production.config.js", "test": "mocha --compilers js:babel-core/register --require .

Can I host my React/redux (client and api server) project on github pages?

◇◆丶佛笑我妖孽 提交于 2021-02-11 12:38:21
问题 I know I can host my react/redux app on github pages by just serving the bundle.js and index.html, but can I also host an api server for the backend that is say username.github.io/api? The server uses node.js/express and they are separate directories. Also, can I make the server repository private and still host it on /api? I looked through the documentation on github pages about creating "projects" but it doesn't make much since to me. If anyone can shed some light on this, it would be must

Using Jekyll, how do you alter an array's contents using a for loop?

二次信任 提交于 2021-02-08 09:57:25
问题 Say I have an array thingy.foo = ['abc', 'def'] in my scope. My goal is to be able to loop over all the items in thingy.foo and apply some conditional logic to it, overwriting the existing item in the array... Something like this: {% for item in thingy.foo %} {% assign thingy.foo[forloop.index0] = site.data.lookups[item] | default: item %} {% endfor %} What I am doing do the item is a bit irrelevant, the part I'm having issues with is updating the item in the array. The code compiles and runs

Using Jekyll, how do you alter an array's contents using a for loop?

我的未来我决定 提交于 2021-02-08 09:56:58
问题 Say I have an array thingy.foo = ['abc', 'def'] in my scope. My goal is to be able to loop over all the items in thingy.foo and apply some conditional logic to it, overwriting the existing item in the array... Something like this: {% for item in thingy.foo %} {% assign thingy.foo[forloop.index0] = site.data.lookups[item] | default: item %} {% endfor %} What I am doing do the item is a bit irrelevant, the part I'm having issues with is updating the item in the array. The code compiles and runs

Gh-pages relative path not found

喜夏-厌秋 提交于 2021-02-08 08:54:35
问题 Hello i try to deploy my second project website on gh-pages it's seems working but all of my images are not showing, i try different path but still not working i'm new on GitHub hope to fixed it soon thank you. here is my website repo https://github.com/rcode321/rafaelmendozasite 回答1: Check first if using relative path is enough in your gh-pages index.html file <img class="my-image main" src="img/mypix2.jpg" alt=""> instead of <img class="my-image main" src="/dist/img/mypix2.jpg" alt=""> The

Hugo Automation with Travis-ci and Github pages

时间秒杀一切 提交于 2021-02-08 04:54:21
问题 I am using github to host my blog and use the static site Generator HUGO to make it possible but its too tedious to make it offline and compile it then upload the public folder to gh-pages or make it available in docs folder. So i wanted to automate the process so whenever i create a new .md file in content it should generate the static site and copy the public folder to gh-pages or the following combination - Source files in "source" branch and content of "public" published to master [for

Gatsby dynamic routing breaks upon gh-pages deploy

半世苍凉 提交于 2021-02-07 20:55:18
问题 I deployed my first Gatsby project to github pages: repo: https://github.com/michal-kurz/stfuandclick gh-pages: https://michal-kurz.github.io/stfuandclick/app/ (generated from gh-pages branch) It has one page, src/pages/app.tsx , which uses use Reach Router for dynamic routing. // app.tsx const App = () => ( <> <GlobalStyles /> <Provider store={store}> <ThemeProvider theme={theme}> <Router> <Homepage path={`${BASE_URL}/app/`} /> <Team path={`${BASE_URL}/app/team/:teamName/`} /> </Router> <

Gatsby dynamic routing breaks upon gh-pages deploy

﹥>﹥吖頭↗ 提交于 2021-02-07 20:55:16
问题 I deployed my first Gatsby project to github pages: repo: https://github.com/michal-kurz/stfuandclick gh-pages: https://michal-kurz.github.io/stfuandclick/app/ (generated from gh-pages branch) It has one page, src/pages/app.tsx , which uses use Reach Router for dynamic routing. // app.tsx const App = () => ( <> <GlobalStyles /> <Provider store={store}> <ThemeProvider theme={theme}> <Router> <Homepage path={`${BASE_URL}/app/`} /> <Team path={`${BASE_URL}/app/team/:teamName/`} /> </Router> <